{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "2693CE7707E14A3BA0739755DCCAE4A9",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "# <center> Lecture13 : Logistic Regression </center>  \n",
        " \n",
        "## <center> Instructor: Dr. Hu Chuan-Peng </center> "
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "AF7A9C61F1D742A4AD900BE48F3039CF",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "## 引入  \n",
        "\n",
        "* 在lec12中，我们介绍了适用于因变量为计数数据的泊松回归模型与负二项回归模型。  \n",
        "\n",
        "* 在本节课中，我们则关注当**因变量为二分变量(例如性别、反应是否正确)**时适用的回归模型——logistic回归模型"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "3D8F1A0D40994C7587A0658A4B651F1D",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "**研究问题**  \n",
        "\n",
        "本节课中我们关注的研究问题：**个体依恋风格中的回避倾向**如何影响个体的**恋爱情况**？  \n",
        "\n",
        "* 成人依恋量表是一种常用于评估个体依恋风格的工具，包括亲密关系中的情感需求和行为模式。其中的回避分数反映了个体在恋爱关系中表现出的回避特征。这些特征通常表现为对亲密关系的回避、不愿意与伴侣建立过多的情感联系、保持独立性和独立思考的倾向。  \n",
        "\n",
        "* 研究假设：具有高回避分数的个体可能更倾向于避免或抵制与伴侣建立深入的情感联系，更难以建立恋爱关系  \n",
        "\n",
        "* 在此示例研究中，我们使用成人依恋量表中的分量表测得回避分数，并使用标准化后的回避分数进行后续分析。  \n",
        "\n",
        "> * 数据来源: Hu, C.-P. et al. (2018). Raw data from the Human Penguin Project. Open Science Framework. https://doi.org/10.17605/OSF.IO/H52D3  \n",
        "> * 回避分数量表来源：Fraley, R. C., Waller, N. G. & Brennan, K. A. An item response theory analysis of self-report measures of adult attachment. J. Pers. Soc. Psychol. 78, 350–365 (2000)."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "collapsed": false,
        "id": "FC33F63F93324755A7EB7A1282EB096D",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "skip"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "# 导入 pymc 模型包，和 arviz 等分析工具 \n",
        "import pymc as pm\n",
        "import arviz as az\n",
        "import seaborn as sns\n",
        "import scipy.stats as st\n",
        "import numpy as np\n",
        "import matplotlib.pyplot as plt\n",
        "import xarray as xr\n",
        "import pandas as pd\n",
        "import ipywidgets\n",
        "\n",
        "# 忽略不必要的警告\n",
        "import warnings\n",
        "warnings.filterwarnings(\"ignore\")"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 2,
      "metadata": {
        "collapsed": false,
        "id": "B7B51E2279D14C4A847BE454625F078E",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "skip"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "# 通过 pd.read_csv 加载数据 Data_Sum_HPP_Multi_Site_Share.csv\n",
        "try:\n",
        "  df_raw = pd.read_csv('/home/mw/input/bayes20238001/Data_Sum_HPP_Multi_Site_Share.csv')\n",
        "except:\n",
        "  df_raw = pd.read_csv('data/Data_Sum_HPP_Multi_Site_Share.csv')\n",
        "\n",
        "# 选取清华站点的数据\n",
        "df = df_raw[df_raw[\"Site\"] == \"Tsinghua\"]\n",
        "\n",
        "# 选取本节课涉及的变量\n",
        "df = df[[\"romantic\", \"avoidance_r\", \"sex\"]]\n",
        "\n",
        "#重新编码，编码后的数据：1 = \"yes\"; 2 = \"no\"\n",
        "df[\"romantic\"] =  np.where(df['romantic'] == 2, 0, 1)\n",
        "\n",
        "#设置索引\n",
        "df[\"index\"] = range(len(df))\n",
        "df = df.set_index(\"index\")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "C12CF1D4429049248683A5E499F22129",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "**🤔思考：当自变量增加或减少时因变量如何变化？**  \n",
        "\n",
        "我们观测一下数据。  \n",
        "- 因变量“恋爱情况(romantic)”为二元变量，其中 1代表“已经恋爱”，0代表“没有恋爱”。  \n",
        "- 自变量“回避倾向(avoidance_r)”为连续变量，并且经过标准化。  \n",
        "\n",
        "可以发现，随着自变量增加，因变量的取值都是 0 或 1，因此，如何发现自变量对因变量的影响？"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 3,
      "metadata": {
        "collapsed": false,
        "id": "A990303E2EBF417D970D6C48E41A2F2D",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>romantic</th>\n",
              "      <th>avoidance_r</th>\n",
              "      <th>sex</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>index</th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0</td>\n",
              "      <td>0.843130</td>\n",
              "      <td>2.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>0</td>\n",
              "      <td>-0.612479</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>0</td>\n",
              "      <td>-1.288297</td>\n",
              "      <td>2.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>0</td>\n",
              "      <td>0.479227</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>1</td>\n",
              "      <td>-0.612479</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>1</td>\n",
              "      <td>1.466962</td>\n",
              "      <td>2.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>0</td>\n",
              "      <td>-1.028367</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>1</td>\n",
              "      <td>-0.768437</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>0</td>\n",
              "      <td>-0.976381</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>1</td>\n",
              "      <td>-0.300563</td>\n",
              "      <td>2.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "       romantic  avoidance_r  sex\n",
              "index                            \n",
              "0             0     0.843130  2.0\n",
              "1             0    -0.612479  1.0\n",
              "2             0    -1.288297  2.0\n",
              "3             0     0.479227  1.0\n",
              "4             1    -0.612479  1.0\n",
              "5             1     1.466962  2.0\n",
              "6             0    -1.028367  1.0\n",
              "7             1    -0.768437  1.0\n",
              "8             0    -0.976381  1.0\n",
              "9             1    -0.300563  2.0"
            ]
          },
          "execution_count": 3,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "# 展示数据\n",
        "df.head(10)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 4,
      "metadata": {
        "collapsed": false,
        "id": "288169F528A542BAA176C623CDA272EA",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<img src=\"https://cdn.kesci.com/upload/rt/288169F528A542BAA176C623CDA272EA/s56v8oc696.png\">"
            ],
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "# 因变量分布\n",
        "plt.hist(df[\"romantic\"])\n",
        "plt.xticks([0,1])\n",
        "plt.xlabel(\"romantic\")\n",
        "plt.ylabel(\"count\")\n",
        "sns.despine()\n",
        "plt.show()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 5,
      "metadata": {
        "collapsed": false,
        "id": "27BDFC46F52541B096B8A03EC494BD0E",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<img src=\"https://cdn.kesci.com/upload/rt/27BDFC46F52541B096B8A03EC494BD0E/s56v8oqadb.png\">"
            ],
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "# 绘制散点图\n",
        "sns.scatterplot(data=df,\n",
        "                x=\"avoidance_r\",\n",
        "                y=\"romantic\",\n",
        "                alpha=0.6)\n",
        "# 设置x轴标题\n",
        "plt.xlabel(\"avoidance\")\n",
        "# 设置y轴刻度\n",
        "plt.yticks([0,1],['no','yes'])\n",
        "sns.despine()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "7850834AB7E94D24998957D483D24B4B",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "## 选择合适的分布  \n",
        "\n",
        "* 🤔我们应该为二元变量$Y_i$选择哪一种分布？  \n",
        "\n",
        "   a. Bernoulli  \n",
        "\n",
        "   b. Gamma  \n",
        "\n",
        "   c. Beta  \n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "CB0C5201D5A14268AD753B6C09F2210A",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "**Gamma分布与Beta分布**  \n",
        "\n",
        "   * 在lec3中，我们介绍了Beta分布，用来模拟周王的支持率$\\pi$，$\\pi$的取值范围满足[0,1]  \n",
        "\n",
        "   * 在lec5中，我们介绍了Gamma分布，用以模拟中国每天获得奖牌的平均数量$\\lambda$ ，$\\lambda$ 是一个可以取任何正值的连续变量  \n",
        "\n",
        "<table>  \n",
        "\t<tr>  \n",
        "            <td>Beta分布</td>  \n",
        "\t\t\t\t\t<td><img src=\"https://cdn.kesci.com/upload/s50phv2jbg.png?imageView2/0/w/960/h/960\" alt=\"\" width=\"200\" height=\"150\"> </td>  \n",
        "   </tr>  \n",
        "   <tr>  \n",
        "            <td>Gamma分布</td>  \n",
        "\t\t\t\t\t<td><img src=\"https://cdn.kesci.com/upload/s50pi6t34t.png?imageView2/0/w/960/h/960\" alt=\"\" width=\"200\" height=\"150\"> </td>  \n",
        "   </tr>  \n",
        "</table>  "
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "90C01F8F4D8C4B5987CBEC5BAD7F85F3",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### 伯努利(Bernoulli)分布  \n",
        "\n",
        "\n",
        "由于 $Y_i$ 是一个离散变量，只有两个取值：0或1，可知Gamma分布与Beta分布都不是合适的分布  \n",
        "\n",
        "更加适合变量 $Y_i$ 的分布为伯努利(Bernoulli)分布，该分布只有两个取值0或1。"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "C595038DEDA447509D2A69195CE32251",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "**伯努利试验**  \n",
        "\n",
        "要了解伯努利分布，我们需要知道伯努利试验。  \n",
        "我们使用抛硬币的例子来演示伯努利试验。  \n",
        "\n",
        "* 假设我们抛一枚硬币，而该硬币正面朝上的概率是p  \n",
        "* 那么抛一枚硬币的结果要不是正面朝上(1)，要不就是反面朝上(0)；  \n",
        "* 其中正面朝上发生的概率是p，反面朝上发生的概率是1=p  \n",
        "\n",
        "用公式表示为：  \n",
        "\n",
        "$$  \n",
        "f(x) = \\left\\{\\begin{matrix} p & if \\: x = 1\\\\  1 - p & if \\: x = 0 \\end{matrix}\\right. \\;\\;\\; \\text{ for } x \\in \\{ 0,1\\} ,\\;\\;\\;0 \\leq p  \\leq 1  \n",
        "$$"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "DCFA747E6F084AB9824AE31DE3EAFCD3",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "我们可以使用`np.random.binomial`来模拟一次伯努利实验的结果"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 6,
      "metadata": {
        "collapsed": false,
        "id": "2947BA88F0B040439033CA3C7A8EDB96",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "硬币朝向为：[1]\n"
          ]
        }
      ],
      "source": [
        "result = np.random.binomial(n=1, p=0.7, size=1)\n",
        "print(f\"硬币朝向为：{result}\")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "D4ED93DA87764E3E8D30B7637AF63F18",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "**伯努利分布**  \n",
        "\n",
        "* 伯努利分布常常用于描述一次单独的二元实验，例如投硬币的结果  \n",
        "\n",
        "* 如果随机变量 $X$ 服从伯努利分布，可以表示为 $X \\sim \\text{Bernoulli}(p)$，其中 $p$ 是成功的概率  \n",
        "\n",
        "* 伯努利分布的概率质量函数为：  \n",
        "\n",
        "    * 其中，X是伯努利随机变量，x是取值为0或1的观察值，p是成功的概率。这个函数表示了在一次伯努利试验中，观察到特定取值x的概率。  \n",
        "\n",
        "$$  \n",
        "P(X = x) = p^x  (1 - p)^{(1 - x)}\\;\\;\\; \\text{ for } x \\in \\{ 0,1\\}  \n",
        "$$  \n",
        "\n",
        "\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 7,
      "metadata": {
        "collapsed": false,
        "id": "6715418F281D45EE83517E24E906BA7A",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<img src=\"\">"
            ],
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "# 定义伯努利分布的绘图函数\n",
        "def plot_bernoulli():\n",
        "\n",
        "    def bernoulli(p):\n",
        "        x = [0,1]\n",
        "        plt.bar(x, st.bernoulli.pmf(x, p), label=f'bernoulli({p})')\n",
        "        plt.xticks([0, 1])\n",
        "        sns.despine()\n",
        "        plt.title(\"Bernoulli Distribution\")\n",
        "        plt.legend()\n",
        "\n",
        "    # 使用 ipywidgets 进行交互式绘图\n",
        "    ipywidgets.interact(bernoulli, p=(0,1,0.1))\n",
        "    plt.show()\n",
        "\n",
        "plot_bernoulli()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "D65509C8C7E7458FBDEDE16B708B6F96",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "**补充知识：伯努利分布与二项分布的关系**  \n",
        "\n",
        "伯努利分布是一个离散型概率分布，它描述了一次试验的结果只有两种可能性的情况，比如成功和失败、是和非等。伯努利分布由一个参数p控制，表示成功的概率。记作X ~ Bernoulli(p)，其中X为随机变量，p为成功的概率。  \n",
        "\n",
        "二项分布是一种离散型概率分布，它描述了在n次相互独立的伯努利试验中，成功次数的概率分布，记作X ~ Binomial(n, p)。其中X为随机变量，n为试验次数，p为每次实验成功的概率。  \n",
        "\n",
        "* 假设我们进行了10次硬币的投掷，每次投掷的结果只有两种可能，正面或反面。每次投掷正面朝上的概率是p。  \n",
        "\n",
        "* 每次投掷的结果服从伯努利分布。  \n",
        "\n",
        "* 10次投掷中，正面朝上可能为 0，1，2，3，...，10。正面朝上次数服从的概率分布为二项分布。  \n",
        "\n",
        "\n",
        "| 分布     | 描述                           | 参数                    | 随机变量    |  \n",
        "|---------|------------------------------|-----------------------|------------|  \n",
        "| 伯努利分布 | 描述一次试验的结果只有两种可能性   | 成功概率 p              | X ~ Bernoulli(p) |  \n",
        "| 二项分布  | 描述在 n 次独立的伯努利试验中成功次数的概率分布 | 试验次数 n, 成功概率 p | X ~ Binomial(n, p) |"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 8,
      "metadata": {
        "collapsed": false,
        "id": "FA87B2F9A3444FA986C5BB881ECF61FA",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<img src=\"https://cdn.kesci.com/upload/rt/FA87B2F9A3444FA986C5BB881ECF61FA/s56v8ovx6z.png\">"
            ],
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "# 定义绘制二项分布的函数\n",
        "def plot_binomial(n,p):\n",
        "\n",
        "  x = np.arange(0, n+1, 1)\n",
        "  plt.plot(x, st.binom(n,p).pmf(x), label=f'binomial({p})')\n",
        "\n",
        "  plt.legend()\n",
        "  plt.show()\n",
        "\n",
        "plot_binomial(10,0.5)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "16FCCD89A864415EAE0CF6E21E3B5A08",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "**使用伯努利概率模型来拟合因变量**  \n",
        "\n",
        "可以从上图发现，伯努利分布和数据因变量分布类似，因此，我们可以尝试使用伯努利分布来描述恋爱情况的分布。  \n",
        "\n",
        "* 我们使用伯努利概率模型来拟合事件 Y 的取值，其中 $\\pi_i$ 表示事件 Y 发生的可能性   $Y_i | \\pi_i \\sim Bern(\\pi_i)$  \n",
        "\n",
        "* 事件 Y 发生的均值与 $\\pi_i$ 相等  $E(Y_i|\\pi_i) = \\pi_i$  \n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "C702224383C6447CB081950A1FA806E2",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "## Odds & probability  \n",
        "\n",
        "在为因变量选择合适的分布后，我们需要考虑自变量与因变量的线性关系  \n",
        "\n",
        "* 在观察数据时，可以发现，由于因变量的取值仅为0或1，我们难以描述因变量随着自变量增加发生的变化。  \n",
        "\n",
        "* 为了建立自变量与因变量的线性模型，我们需要引入概念：**概率**和**发生比(odds)**"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "6738B6FA6E8644B493B89EDC57DD2FA1",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### 概率(probability)  \n",
        "\n",
        "当不考虑自变量时，因变量“恋爱情况”为““是”的概率为 0.374”  \n",
        "\n",
        "当考虑自变量“回避倾向”时：  \n",
        "\n",
        "* 首先，我们将回避倾向分为2个部分  \n",
        "  * 当“回避倾向”<0，“恋爱情况”为“是”的概率为 0.409;  \n",
        "  * 当“回避倾向”>0，“恋爱情况”为“是”的概率为0.337  \n",
        "  \n",
        "* 似乎，随着回避倾向的增加，恋爱的概率降低  \n",
        "\n",
        "* 然后，我们可以尝试将回避倾向分为3个部分  \n",
        "  * 当“回避倾向”<-0.5，已经恋爱的概率为0.448  \n",
        "  * 当“回避倾向”在[-0.5,0.5]，已经恋爱的概率为0.273  \n",
        "  * 当“回避倾向”>0.5，已经恋爱的概率为0.393  \n",
        "\n",
        "* 🙋‍♀️我们可以借助概率的变化来描述自变量与因变量之间的关系"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 9,
      "metadata": {
        "collapsed": false,
        "id": "6D5F36C10E8B4D97B35EF28E55E0A255",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "因变量“恋爱情况”为“是”的概率为0.374\n"
          ]
        }
      ],
      "source": [
        "print(f\"因变量“恋爱情况”为“是”的概率为{df.romantic.mean():.3f}\")"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 10,
      "metadata": {
        "collapsed": false,
        "id": "E309E807994A42EF8D53FC45BDDAD298",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "当“回避倾向”<0，“恋爱情况”为“是”的概率为0.409\n",
            "当“回避倾向”>0，“恋爱情况”为“是”的概率为0.337\n"
          ]
        }
      ],
      "source": [
        "print(f\"当“回避倾向”<0，“恋爱情况”为“是”的概率为{df[df.avoidance_r<0].romantic.mean():.3f}\")\n",
        "print(f\"当“回避倾向”>0，“恋爱情况”为“是”的概率为{df[df.avoidance_r>0].romantic.mean():.3f}\")"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 11,
      "metadata": {
        "collapsed": false,
        "id": "5F1616BB864143D1AB6EA5010054866C",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "当“回避倾向”<-0.5，“是”的概率为0.448\n",
            "当“回避倾向”在[-0.5,0.5]，“是”的概率为0.273\n",
            "当“回避倾向”>0.5，“是”的概率为0.393\n"
          ]
        }
      ],
      "source": [
        "print(f\"当“回避倾向”<-0.5，“是”的概率为{df[df.avoidance_r<-0.5].romantic.mean():.3f}\")\n",
        "print(f\"当“回避倾向”在[-0.5,0.5]，“是”的概率为{df[(df.avoidance_r >=-0.5) & (df.avoidance_r <=0.5)].romantic.mean():.3f}\")\n",
        "print(f\"当“回避倾向”>0.5，“是”的概率为{df[df.avoidance_r>0.5].romantic.mean():.3f}\")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "5B2B0A92034441E992C477560FAE2800",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "**伯努利分布、真实数据、与线性关系**  \n",
        "\n",
        "* 曲线上的每一个点，都服从伯努利分布 $Y_i | \\pi_i \\sim \\text{Bern}(\\pi_i)$  \n",
        "\n",
        "* 当回避倾向较小时，恋爱情况为“是”的概率更高，在真实数据中更可能出现“1”  \n",
        "\n",
        "* 然而如图所示，曲线代表的是$\\pi_i$与自变量$X$之间的关系，二者的关系并不是线性的，因此我们需要对因变量进行一定转换，建立线性关系  \n",
        "\n",
        "![Image Name](https://cdn.kesci.com/upload/s51rjqo7jp.png?imageView2/0/w/640/h/640)  "
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "6CE080C2280B46DCA477BF97722C9F65",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "**发生率(odds)**  \n",
        "\n",
        "在这个例子中，$\\pi$为因变量$Y$发生的概率  \n",
        "* 发生比(odds)的定义为：**事件发生概率**与 **事件不发生概率**之比  \n",
        "\n",
        "$$  \n",
        "\\begin{equation}  \n",
        "\\text{odds} = \\frac{\\pi}{1-\\pi} \\;\\;,\\;\\;\\;  \n",
        "\\pi = \\frac{\\text{odds}}{1 + \\text{odds}}  \n",
        "\\end{equation}  \n",
        "$$  \n",
        "\n",
        "* 比如，明天下雨发生的概率是$\\pi = 2/3$，则明天不下雨的概率为$1 - \\pi = 1/3$  \n",
        "\n",
        "    * 在这个例子中，发生比为2，明天下雨的可能性是不下雨可能性的两倍  \n",
        "    \n",
        "    * $\\pi$的值在$(0,1)$之间，odds的范围则可以是$(0,+\\infty)$  \n",
        "$$  \n",
        "\\text{odds of rain } = \\frac{2/3}{1-2/3} = 2  \n",
        "$$  \n",
        "\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "6132C7BE4DB94AD1A60E5EB8CDEB77F3",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "事件的发生概率$\\pi \\in [0,1]$，事件对应的发生比为$\\;\\;\\;\\pi / (1-\\pi) \\in [0, \\infty)$  \n",
        "\n",
        "> 将发生比与1进行比较来衡量事件发生的不确定性：  \n",
        "\n",
        "1. 当事件发生的概率$\\pi < 0.5$时，事件的发生比小于1  \n",
        "\n",
        "2. 当事件发生的概率$\\pi = 0.5$时，事件的发生比为等于1  \n",
        "\n",
        "3. 当事件发生的概率$\\pi > 0.5$时，事件的发生比为大于1"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "8E4558E304644E118EDEAFD6C4DF4AFE",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "## 选择连接函数(link function)  \n",
        "\n",
        "* 现在我们可以借助 回答为“是”的概率，以及回答为“是”的发生比，来对回避倾向和恋爱情况建立线性关系  \n",
        "\n",
        "* 由于恋爱情况是一个二分变量，我们使用 logistic回归模型，它是广义线性模型中的一种  \n",
        "\n",
        "* 在广义线性模型中，我们需要找到一个连接函数$g(\\cdot)$，使得参数g($\\pi_i$)可以被表示为自变量$X_{i1}$的线性组合  \n",
        "\n",
        "    * 🤔以下哪一个是合理的连接函数？  \n",
        "\n",
        "    1. $\\pi_i = \\beta_0 + \\beta_1 X_{i1}$  \n",
        "\n",
        "    2.  $\\log(\\pi_i) = \\beta_0 + \\beta_1 X_{i1}$  \n",
        "\n",
        "    3.  $\\text{odds}_i = \\beta_0 + \\beta_1 X_{i1}$  \n",
        "\n",
        "    4.  $\\log(\\text{odds}_i) = \\beta_0 + \\beta_1 X_{i1}$  \n",
        "\n",
        "* 我们可以比较等式左右两边的取值范围是否一致，并将上述连接函数进行可视化  \n",
        "\n",
        "| 等式左边    | 取值范围     | 等式右边      | 取值范围    |   \n",
        "| -------- | ----------------- | ---------------- | ------------------ |  \n",
        "| $\\pi_i$  |  $(0,1)$    | $\\beta_0 + \\beta_1 X_{i1}$  | $(-\\infty, +\\infty)$  |  \n",
        "| $\\log(\\pi_i)$  |  $(-\\infty,0)$     | $\\beta_0 + \\beta_1 X_{i1}$  | $(-\\infty, +\\infty)$   |  \n",
        "| ${odds}_i$  |  $(0,+\\infty)$    | $\\beta_0 + \\beta_1 X_{i1}$  | $(-\\infty, +\\infty)$   |  \n",
        "| $\\log({odds}_i)$  |$(-\\infty, -+\\infty)$  | $\\beta_0 + \\beta_1 X_{i1}$  | $(-\\infty, +\\infty)$   |  \n",
        "\n",
        "![Image Name](https://cdn.kesci.com/upload/s50t4pi0jo.png?imageView2/0/w/960/h/960)  \n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "C35279A776844EC3A679277B44DA270C",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### 公式中各参数的意义  \n",
        "\n",
        "$$  \n",
        "\\log(\\text{odds}) = \\log\\left(\\frac{\\pi}{1-\\pi}\\right) = \\beta_0 + \\beta_1 X_1 + \\cdots + \\beta_p X_p  \n",
        "$$  \n",
        "\n",
        "也可以写成：$\\text{odds} = e^{\\beta_0 + \\beta_1 X_{1} +\\cdots + \\beta_p X_p}$  \n",
        "\n",
        "* $\\beta_0$  \n",
        "\n",
        "    * 当$(X_1,X_2,\\ldots,X_p) = 0$时，$\\text{odds} = e^{\\beta_0}$，即$e^{\\beta_0}$表示当所有自变量为0时，事件的发生比  \n",
        "\n",
        "* $\\beta_1$  \n",
        "\n",
        "    * $\\beta_1 = \\log(\\text{odds}_{x+1}) - \\log(\\text{odds}_x)\\;\\;\\;$ → $\\;\\;\\; e^{\\beta_1} = \\frac{\\text{odds}_{x+1}}{\\text{odds}_x}$  \n",
        "\n",
        "    * 当其他自变量保持不变时，$X_1$每增加一个单位（从$x$ → $x+1$），$e^{\\beta_1}$表示事件发生比的倍数变化  \n",
        "\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "9B24A583CF4146B295F872EE8BD977D8",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "\n",
        "* 计算  \n",
        "\n",
        "    $\\log\\left(\\frac{\\pi_i}{1 - \\pi_i}\\right) = \\beta_0 + \\beta_1 X_{i1}\\;\\;\\;$ →  $\\;\\;\\;\\frac{\\pi_i}{1-\\pi_i} = e^{\\beta_0 + \\beta_1 X_{i1}}\\;\\;\\;$ →  $\\;\\;\\;\\pi_i = \\frac{e^{\\beta_0 + \\beta_1 X_{i1}}}{1 + e^{\\beta_0 + \\beta_1 X_{i1}}}$  "
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "52668AF7FE9D489A938E0F3BC98BD3E5",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "## 模型定义  \n",
        "\n",
        "$$  \n",
        "\\begin{array}{lcrl}  \n",
        "\\text{data:} & \\hspace{.01in} & Y_i|\\beta_0,\\beta_1 & \\stackrel{ind}{\\sim} \\text{Bern}(\\pi_i) \\;\\; \\text{ with } \\;\\; \\pi_i = \\frac{e^{\\beta_0 + \\beta_1 X_{i1}}}{1 + e^{\\beta_0 + \\beta_1 X_{i1}}} \\\\  \n",
        "\\text{priors:} & & \\beta_{0}  &  \\sim N\\left(0, 0.5^2 \\right)  \\\\  \n",
        "               & & \\beta_1  & \\sim N\\left(0, 0.5^2 \\right)\\\\  \n",
        "\\end{array}  \n",
        "$$"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 12,
      "metadata": {
        "collapsed": false,
        "id": "6590495AE8914263B90D8B40B14140F4",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "with pm.Model() as log_model1:\n",
        "    # 此处对coords的定义方式进行了更改，因为后续我们需要进行对新数据的预测\n",
        "    # 因此将维度定义成可更改的\n",
        "    log_model1.add_coord('obs_id',df.index, mutable=True)\n",
        "    avoidance = pm.MutableData(\"avoidance\", df.avoidance_r, dims=\"obs_id\")\n",
        "    y = pm.MutableData('y', df.romantic, dims = 'obs_id')\n",
        "\n",
        "    #先验\n",
        "    beta_0 = pm.Normal(\"beta_0\", mu=0, sigma=0.5)          #定义beta_0          \n",
        "    beta_1 = pm.Normal(\"beta_1\", mu=0, sigma=0.5)           #定义beta_1\n",
        "    #线性关系\n",
        "    mu = pm.Deterministic(\"mu\", beta_0 + beta_1 * avoidance, dims=\"obs_id\")\n",
        "    #注意此处使用了Logistic sigmoid function：pm.math.invlogit\n",
        "    #相当于进行了如下计算 (1 / (1 + exp(-mu))\n",
        "    pi = pm.Deterministic(\"pi\", pm.math.invlogit(mu), dims=\"obs_id\")\n",
        "    #似然\n",
        "    likelihood = pm.Bernoulli(\"y_est\",p=pi, observed=y,dims=\"obs_id\")"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 13,
      "metadata": {
        "collapsed": false,
        "id": "2EEB6BB8C2374058A95467B483B5430C",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<img src=\"https://cdn.kesci.com/upload/rt/2EEB6BB8C2374058A95467B483B5430C/s56v8pdogo.svg\">"
            ],
            "text/plain": [
              "<graphviz.graphs.Digraph at 0x7f95ad007a30>"
            ]
          },
          "execution_count": 13,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "# 可视化模型（贝叶斯变量因果图）\n",
        "# 我们使用 pymc 自带的 `model_to_graphviz` 方法来可视化模型中各变量的因果关系。\n",
        "pm.model_to_graphviz(log_model1)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "67AB16F566784084861A5B8229DA757E",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### 先验预测检验  \n",
        "\n",
        "使用`pm.sample_prior_predictive`进行先验预测检验，来查看由当前先验组合生成的$\\pi$是否都在$(0-1)$范围内  \n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 14,
      "metadata": {
        "collapsed": false,
        "id": "9FBE58AA18B945679705969BE004661E",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Sampling: [beta_0, beta_1, y_est]\n"
          ]
        }
      ],
      "source": [
        "log1_prior = pm.sample_prior_predictive(samples=50, \n",
        "                                          model=log_model1,\n",
        "                                          random_seed=84735)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "D093E242C8FC4035A774DABD2E11616A",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "* 在模型定义中我们已经对`pi`进行定义，因此`pm.sample_prior_predictive`就会自动生成对`pi`的预测  \n",
        "\n",
        "* 该预测储存在`prior`中  \n",
        "\n",
        "* 我们设置抽样数为50，这体现在维度`draw`中  \n",
        "\n",
        "* 结合循环，使用`sns.lineplot`绘制出每个回避分数对应的$\\pi$值并连接成光滑的曲线"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 15,
      "metadata": {
        "collapsed": false,
        "id": "BDDB29BF4DF94E739422D4436BCE8C6A",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "\n",
              "            <div>\n",
              "              <div class='xr-header'>\n",
              "                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n",
              "              </div>\n",
              "              <ul class=\"xr-sections group-sections\">\n",
              "              \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_priord9097c46-38a2-4794-85ec-a57088905be8\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_priord9097c46-38a2-4794-85ec-a57088905be8\" class = \"xr-section-summary\">prior</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:  (chain: 1, draw: 50, obs_id: 174)\n",
              "Coordinates:\n",
              "  * chain    (chain) int64 0\n",
              "  * draw     (draw) int64 0 1 2 3 4 5 6 7 8 9 ... 40 41 42 43 44 45 46 47 48 49\n",
              "  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 166 167 168 169 170 171 172 173\n",
              "Data variables:\n",
              "    pi       (chain, draw, obs_id) float64 0.2273 0.3616 ... 0.4751 0.4511\n",
              "    beta_1   (chain, draw) float64 -0.4502 0.1503 -0.4098 ... -0.25 0.6187\n",
              "    beta_0   (chain, draw) float64 -0.8442 0.3237 -0.2128 ... 0.329 0.2792\n",
              "    mu       (chain, draw, obs_id) float64 -1.224 -0.5685 ... -0.09977 -0.1963\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:17:14.701829\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-1fdc1b86-7790-45fd-910a-ad331d9048b2' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-1fdc1b86-7790-45fd-910a-ad331d9048b2' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 1</li><li><span class='xr-has-index'>draw</span>: 50</li><li><span class='xr-has-index'>obs_id</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-62114436-3cc9-45aa-85fd-7dbd10c8eee9' class='xr-section-summary-in' type='checkbox'  checked><label for='section-62114436-3cc9-45aa-85fd-7dbd10c8eee9' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0</div><input id='attrs-983941d1-4dec-4649-bb09-790ddd1feef6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-983941d1-4dec-4649-bb09-790ddd1feef6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a4f1a5aa-4750-4c2f-8511-2444115a8f8d' class='xr-var-data-in' type='checkbox'><label for='data-a4f1a5aa-4750-4c2f-8511-2444115a8f8d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 44 45 46 47 48 49</div><input id='attrs-da88066c-1303-488d-a4d2-9718667a8c66' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-da88066c-1303-488d-a4d2-9718667a8c66' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-734b38c2-3b4d-41bc-a6bf-31bec216f8c0' class='xr-var-data-in' type='checkbox'><label for='data-734b38c2-3b4d-41bc-a6bf-31bec216f8c0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
              "       18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,\n",
              "       36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-0cdfd703-defc-40be-8112-6b3240f85344' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0cdfd703-defc-40be-8112-6b3240f85344' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f9a02f28-86f9-4462-9a7a-f2f5b3b2389b' class='xr-var-data-in' type='checkbox'><label for='data-f9a02f28-86f9-4462-9a7a-f2f5b3b2389b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-eb75a061-f03a-440c-bada-6c70b49e1e17' class='xr-section-summary-in' type='checkbox'  checked><label for='section-eb75a061-f03a-440c-bada-6c70b49e1e17' class='xr-section-summary' >Data variables: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>pi</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2273 0.3616 ... 0.4751 0.4511</div><input id='attrs-01a01c23-d3b6-47ba-ab02-4ade32e2c484' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-01a01c23-d3b6-47ba-ab02-4ade32e2c484' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1295e19e-5198-4991-abc6-61e9272c3bbd' class='xr-var-data-in' type='checkbox'><label for='data-1295e19e-5198-4991-abc6-61e9272c3bbd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[0.22727911, 0.36158632, 0.43431659, ..., 0.30451128,\n",
              "         0.36158632, 0.37794498],\n",
              "        [0.61073631, 0.55764397, 0.53245896, ..., 0.57873043,\n",
              "         0.55764397, 0.55185352],\n",
              "        [0.36393728, 0.50955672, 0.57815397, ..., 0.451125  ,\n",
              "         0.50955672, 0.52551464],\n",
              "        ...,\n",
              "        [0.57519435, 0.37625784, 0.29300055, ..., 0.45318199,\n",
              "         0.37625784, 0.35615509],\n",
              "        [0.529522  , 0.61826487, 0.65727485, ..., 0.58399714,\n",
              "         0.61826487, 0.62742509],\n",
              "        [0.69015647, 0.47507719, 0.37333846, ..., 0.56317136,\n",
              "         0.47507719, 0.45108955]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.4502 0.1503 ... -0.25 0.6187</div><input id='attrs-fcfb7e03-43df-493d-be80-b80ce12d1db7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-fcfb7e03-43df-493d-be80-b80ce12d1db7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1919b524-1a99-46a2-aaf0-9f36975fb53e' class='xr-var-data-in' type='checkbox'><label for='data-1919b524-1a99-46a2-aaf0-9f36975fb53e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.45015772,  0.15031697, -0.40982661, -1.01903658,  0.67722721,\n",
              "         0.67052879, -0.17407432, -0.058783  , -0.86824688,  0.87698241,\n",
              "         0.34405744, -0.18121156, -0.25137161,  0.26085076, -0.23012309,\n",
              "        -0.13604474,  0.50533901, -0.02989736,  0.09110079, -0.18597314,\n",
              "         0.80739856, -0.12134675, -0.21246652,  0.24699158, -0.27605264,\n",
              "        -0.16406475, -0.79526885, -0.53806973,  1.21223425,  0.36701458,\n",
              "         0.21548845,  0.24941996,  0.7687127 ,  0.1311487 ,  1.1218035 ,\n",
              "         0.59454672, -0.52993118, -0.69434518,  0.70661083,  0.43153348,\n",
              "        -0.81731657, -0.31530337,  0.2609324 ,  0.15769362, -0.17557317,\n",
              "        -0.76838751,  0.48236414,  0.55546433, -0.2500428 ,  0.61872734]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_0</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.8442 0.3237 ... 0.329 0.2792</div><input id='attrs-abca2ff5-b14d-464c-99ec-93927c2ee647' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-abca2ff5-b14d-464c-99ec-93927c2ee647' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c33af19d-63c4-4e8b-925a-57392d4e5755' class='xr-var-data-in' type='checkbox'><label for='data-c33af19d-63c4-4e8b-925a-57392d4e5755' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.84419781,  0.32367163, -0.21277867, -0.14702594, -0.4040952 ,\n",
              "         0.15438523,  0.22244838,  0.310824  , -0.20838336, -0.02253305,\n",
              "         0.67955903,  0.09554137, -0.60484366,  0.60201255,  0.49710903,\n",
              "        -0.54395113, -0.07160803,  0.20362832,  0.6203541 ,  0.64139045,\n",
              "         1.1974333 ,  0.45375691, -0.95617741,  0.13629568,  0.14066206,\n",
              "         0.07794967, -0.42268206,  0.03153336,  1.11073537, -0.43764954,\n",
              "        -0.27985467, -0.12940392, -0.16323124,  0.21330484, -0.17767616,\n",
              "        -0.66226404, -0.25805632, -0.0389231 , -0.05328567,  0.24780844,\n",
              "         0.50230694,  0.4667296 ,  0.41031773,  0.00273298, -0.16766809,\n",
              "        -0.5704856 , -0.1780396 , -0.16525221,  0.32904402,  0.27918358]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>mu</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-1.224 -0.5685 ... -0.09977 -0.1963</div><input id='attrs-8564cdbd-f64c-4ac4-8657-ebd3316f0804' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8564cdbd-f64c-4ac4-8657-ebd3316f0804' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b7f8922c-692c-4c7c-a6cc-b9bdc9c5c688' class='xr-var-data-in' type='checkbox'><label for='data-b7f8922c-692c-4c7c-a6cc-b9bdc9c5c688' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[-1.22373911, -0.56848566, -0.26426084, ..., -0.82590666,\n",
              "         -0.56848566, -0.49827993],\n",
              "        [ 0.45040832,  0.23160564,  0.13001868, ...,  0.31756384,\n",
              "          0.23160564,  0.2081625 ],\n",
              "        [-0.55831562,  0.03823152,  0.31519983, ..., -0.19612629,\n",
              "          0.03823152,  0.10214728],\n",
              "        ...,\n",
              "        [ 0.30307622, -0.50546244, -0.88085539, ..., -0.18782225,\n",
              "         -0.50546244, -0.59209158],\n",
              "        [ 0.11822553,  0.48218998,  0.65117348, ...,  0.33920395,\n",
              "          0.48218998,  0.52118617],\n",
              "        [ 0.80085092, -0.09977392, -0.51792117, ...,  0.25404298,\n",
              "         -0.09977392, -0.19626944]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-556862d5-3e02-489d-82f5-a6cf7e8ccba6' class='xr-section-summary-in' type='checkbox'  checked><label for='section-556862d5-3e02-489d-82f5-a6cf7e8ccba6' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:17:14.701829</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_prior_predictivec2b11764-34d2-4139-a55f-286e8dd94e30\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_prior_predictivec2b11764-34d2-4139-a55f-286e8dd94e30\" class = \"xr-section-summary\">prior_predictive</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:  (chain: 1, draw: 50, obs_id: 174)\n",
              "Coordinates:\n",
              "  * chain    (chain) int64 0\n",
              "  * draw     (draw) int64 0 1 2 3 4 5 6 7 8 9 ... 40 41 42 43 44 45 46 47 48 49\n",
              "  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 166 167 168 169 170 171 172 173\n",
              "Data variables:\n",
              "    y_est    (chain, draw, obs_id) int64 1 0 0 0 0 0 1 0 0 ... 1 1 0 0 0 1 1 0 0\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:17:14.719100\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-07e5e0a5-67fb-471a-80c3-82ecc5119355' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-07e5e0a5-67fb-471a-80c3-82ecc5119355' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 1</li><li><span class='xr-has-index'>draw</span>: 50</li><li><span class='xr-has-index'>obs_id</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-49d54117-e9f4-48d0-ac05-2cf1c2854db5' class='xr-section-summary-in' type='checkbox'  checked><label for='section-49d54117-e9f4-48d0-ac05-2cf1c2854db5' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0</div><input id='attrs-6ddae2b0-bb63-47b0-be27-d1a9d2ee911e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6ddae2b0-bb63-47b0-be27-d1a9d2ee911e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c4ee49c1-630e-418b-b227-b2056706a45f' class='xr-var-data-in' type='checkbox'><label for='data-c4ee49c1-630e-418b-b227-b2056706a45f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 44 45 46 47 48 49</div><input id='attrs-6fb7e63e-ef84-47e3-a33c-9327c544a510' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6fb7e63e-ef84-47e3-a33c-9327c544a510' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0f87a90c-1f45-489c-a2ea-5f55b69c482d' class='xr-var-data-in' type='checkbox'><label for='data-0f87a90c-1f45-489c-a2ea-5f55b69c482d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
              "       18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,\n",
              "       36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-5f9f0af1-8a28-4019-8da3-0ffc3c6469b3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5f9f0af1-8a28-4019-8da3-0ffc3c6469b3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-59bd6f51-fced-42e4-8339-bfde77289d19' class='xr-var-data-in' type='checkbox'><label for='data-59bd6f51-fced-42e4-8339-bfde77289d19' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-f97d641c-5c57-42fa-a573-b1f8bfd42aab' class='xr-section-summary-in' type='checkbox'  checked><label for='section-f97d641c-5c57-42fa-a573-b1f8bfd42aab' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>y_est</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 0 0 0 0 0 1 0 ... 1 0 0 0 1 1 0 0</div><input id='attrs-ec8322a6-fb3c-4576-bec4-d46c8f35067e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ec8322a6-fb3c-4576-bec4-d46c8f35067e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ccdfe969-c938-403a-a44d-6a484d83da6e' class='xr-var-data-in' type='checkbox'><label for='data-ccdfe969-c938-403a-a44d-6a484d83da6e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[1, 0, 0, ..., 0, 0, 1],\n",
              "        [1, 1, 0, ..., 1, 0, 1],\n",
              "        [1, 0, 0, ..., 1, 1, 1],\n",
              "        ...,\n",
              "        [0, 0, 0, ..., 1, 0, 0],\n",
              "        [0, 1, 1, ..., 0, 1, 1],\n",
              "        [1, 0, 0, ..., 1, 0, 0]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-6c5feacb-4626-4e10-9446-b6b2a6be03eb' class='xr-section-summary-in' type='checkbox'  checked><label for='section-6c5feacb-4626-4e10-9446-b6b2a6be03eb' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:17:14.719100</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_observed_dataadbbb0ca-1a71-47a6-b5bf-fbbdb7cd16af\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_observed_dataadbbb0ca-1a71-47a6-b5bf-fbbdb7cd16af\" class = \"xr-section-summary\">observed_data</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:  (obs_id: 174)\n",
              "Coordinates:\n",
              "  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 166 167 168 169 170 171 172 173\n",
              "Data variables:\n",
              "    y_est    (obs_id) int64 0 0 0 0 1 1 0 1 0 1 1 1 ... 1 1 1 0 0 0 0 0 0 0 0 1\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:17:14.723723\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-e57d25c2-4d2d-4dc0-9f95-a47fcb294cac' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-e57d25c2-4d2d-4dc0-9f95-a47fcb294cac' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-e082cc1c-72dc-4d3c-ab32-da09a5c50e0d' class='xr-section-summary-in' type='checkbox'  checked><label for='section-e082cc1c-72dc-4d3c-ab32-da09a5c50e0d' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-64af2bc4-a460-4b3a-a98a-201ed97443a8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-64af2bc4-a460-4b3a-a98a-201ed97443a8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e2852c4d-091a-468c-a06d-67416b343b0e' class='xr-var-data-in' type='checkbox'><label for='data-e2852c4d-091a-468c-a06d-67416b343b0e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-d1f3fd9d-6edb-4379-ba5a-6bf2c0bca7b4' class='xr-section-summary-in' type='checkbox'  checked><label for='section-d1f3fd9d-6edb-4379-ba5a-6bf2c0bca7b4' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>y_est</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 0 0 0 1 1 0 1 ... 0 0 0 0 0 0 0 1</div><input id='attrs-6803995e-7166-4647-a5ca-77905e5be88c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6803995e-7166-4647-a5ca-77905e5be88c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2819114d-3b64-4565-88ff-a12283cb53c2' class='xr-var-data-in' type='checkbox'><label for='data-2819114d-3b64-4565-88ff-a12283cb53c2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,\n",
              "       1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1,\n",
              "       0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0,\n",
              "       1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1,\n",
              "       0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,\n",
              "       0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-7472ba09-dcf7-441e-9cc0-9277da997cc3' class='xr-section-summary-in' type='checkbox'  checked><label for='section-7472ba09-dcf7-441e-9cc0-9277da997cc3' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:17:14.723723</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_constant_dataa3420eab-2f67-42dc-805c-336ece4cf7f3\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_constant_dataa3420eab-2f67-42dc-805c-336ece4cf7f3\" class = \"xr-section-summary\">constant_data</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:    (obs_id: 174)\n",
              "Coordinates:\n",
              "  * obs_id     (obs_id) int64 0 1 2 3 4 5 6 7 ... 167 168 169 170 171 172 173\n",
              "Data variables:\n",
              "    avoidance  (obs_id) float64 0.8431 -0.6125 -1.288 ... -0.6125 -0.7684\n",
              "    y          (obs_id) int32 0 0 0 0 1 1 0 1 0 1 1 1 ... 1 1 0 0 0 0 0 0 0 0 1\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:17:14.728339\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-4d1c614a-3d2d-468a-80e2-278a3669cc8c' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-4d1c614a-3d2d-468a-80e2-278a3669cc8c' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-f93c9b2b-4de5-417c-b6f0-83503e7f6732' class='xr-section-summary-in' type='checkbox'  checked><label for='section-f93c9b2b-4de5-417c-b6f0-83503e7f6732' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-0f973716-f8de-424b-95ce-b42d64c94fa3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0f973716-f8de-424b-95ce-b42d64c94fa3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ebb0e6b1-27f6-4dc9-8b8c-bef6bae7d8ec' class='xr-var-data-in' type='checkbox'><label for='data-ebb0e6b1-27f6-4dc9-8b8c-bef6bae7d8ec' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-a54a7950-9f68-4738-a107-ece3f7cf5f5f' class='xr-section-summary-in' type='checkbox'  checked><label for='section-a54a7950-9f68-4738-a107-ece3f7cf5f5f' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>avoidance</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.8431 -0.6125 ... -0.6125 -0.7684</div><input id='attrs-cfe4be3b-0eec-4c8c-be51-822c3e2e5730' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-cfe4be3b-0eec-4c8c-be51-822c3e2e5730' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-08284b42-42cf-4261-96ca-54b356c5aaa5' class='xr-var-data-in' type='checkbox'><label for='data-08284b42-42cf-4261-96ca-54b356c5aaa5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0.84312961, -0.61247899, -1.28829727,  0.47922746, -0.61247899,\n",
              "        1.46696187, -1.02836716, -0.76843705, -0.97638114, -0.30056286,\n",
              "        0.79114359,  0.79114359, -1.02836716, -0.04063275, -0.04063275,\n",
              "        0.84312961, -1.08035318, -1.13233921,  0.63518553,  0.37525542,\n",
              "        0.68717155, -0.04063275, -2.01610157, -1.96411555, -0.30056286,\n",
              "       -1.34028329,  1.93483607, -0.24857684,  0.73915757, -0.24857684,\n",
              "        0.79114359, -0.24857684, -0.35254888, -0.56049297,  2.87058445,\n",
              "       -0.30056286, -1.18432523,  0.47922746,  0.84312961, -1.54822738,\n",
              "        0.16731133,  1.10305972, -0.50850695,  0.06333929,  0.79114359,\n",
              "        1.36298983,  0.06333929, -0.35254888,  0.63518553,  0.11532531,\n",
              "       -1.65219942, -0.82042308, -0.82042308, -0.19659082, -0.30056286,\n",
              "        1.25901779,  1.0510737 , -0.56049297, -0.97638114, -1.91212953,\n",
              "        0.58319951,  0.21929736,  0.16731133,  0.42724144, -0.8724091 ,\n",
              "        0.84312961,  0.58319951,  0.53121348,  0.27128338,  0.79114359,\n",
              "        0.47922746, -1.34028329,  0.3232694 , -0.4045349 ,  1.88285005,\n",
              "       -0.92439512, -0.97638114, -0.76843705,  1.46696187, -0.35254888,\n",
              "       -0.82042308, -1.39226931,  0.84312961,  0.53121348, -0.66446501,\n",
              "        0.53121348,  0.84312961,  0.06333929, -0.8724091 , -1.49624136,\n",
              "       -0.8724091 , -0.4045349 ,  2.29873822, -0.35254888, -1.39226931,\n",
              "       -0.82042308,  0.79114359,  0.94710166,  0.79114359,  0.79114359,\n",
              "        2.09079413, -1.34028329, -1.70418544,  0.79114359, -0.1446048 ,\n",
              "       -0.19659082,  0.58319951,  1.10305972,  0.84312961,  0.27128338,\n",
              "       -1.13233921, -0.61247899,  0.16731133, -0.19659082, -0.30056286,\n",
              "        0.27128338,  0.11532531,  0.11532531,  0.79114359, -0.92439512,\n",
              "       -1.80815749,  0.37525542, -0.04063275,  1.15504574, -1.28829727,\n",
              "       -1.28829727, -1.08035318, -1.44425533, -0.30056286, -1.23631125,\n",
              "        0.94710166,  0.68717155,  0.01135327, -0.04063275,  0.79114359,\n",
              "       -0.04063275,  1.0510737 , -0.71645103,  0.3232694 ,  0.06333929,\n",
              "        0.79114359, -1.70418544, -0.1446048 ,  1.98682209,  0.79114359,\n",
              "        2.09079413, -1.91212953, -1.44425533,  0.63518553, -0.92439512,\n",
              "        0.68717155, -0.50850695, -1.28829727,  3.07852854, -0.09261877,\n",
              "        1.778878  , -0.35254888, -0.92439512,  0.53121348, -0.92439512,\n",
              "       -0.56049297, -0.4045349 ,  0.68717155,  2.29873822,  0.53121348,\n",
              "        1.0510737 ,  0.58319951,  1.31100381,  0.21929736,  0.16731133,\n",
              "        0.58319951, -0.04063275, -0.61247899, -0.76843705])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>y</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>0 0 0 0 1 1 0 1 ... 0 0 0 0 0 0 0 1</div><input id='attrs-f28932e9-a85b-4135-987c-a80e500f865a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f28932e9-a85b-4135-987c-a80e500f865a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1503a52d-2a4b-4d1f-85ad-90de4135cdd1' class='xr-var-data-in' type='checkbox'><label for='data-1503a52d-2a4b-4d1f-85ad-90de4135cdd1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,\n",
              "       1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1,\n",
              "       0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0,\n",
              "       1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1,\n",
              "       0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,\n",
              "       0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1],\n",
              "      dtype=int32)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-e49da2a2-f48d-4ee1-98be-632ef1e2c185' class='xr-section-summary-in' type='checkbox'  checked><label for='section-e49da2a2-f48d-4ee1-98be-632ef1e2c185' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:17:14.728339</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "              </ul>\n",
              "            </div>\n",
              "            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-sections.group-sections {\n",
              "  grid-template-columns: auto;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt, dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              ".xr-wrap{width:700px!important;} </style>"
            ],
            "text/plain": [
              "Inference data with groups:\n",
              "\t> prior\n",
              "\t> prior_predictive\n",
              "\t> observed_data\n",
              "\t> constant_data"
            ]
          },
          "execution_count": 15,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "log1_prior"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 16,
      "metadata": {
        "collapsed": false,
        "id": "02A4710D2DFD4EAC8A627F8E665BD3A7",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<img src=\"https://cdn.kesci.com/upload/rt/02A4710D2DFD4EAC8A627F8E665BD3A7/s56v9s5za9.png\">"
            ],
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "#对于一次抽样，可以绘制出一条曲线，结合循环绘制出50条曲线\n",
        "for i in range(log1_prior.prior.dims[\"draw\"]):\n",
        "    sns.lineplot(x = log1_prior.constant_data[\"avoidance\"],\n",
        "                y = log1_prior.prior[\"pi\"].stack(sample=(\"chain\", \"draw\"))[:,i], c=\"grey\" )\n",
        "#设置x、y轴标题和总标题    \n",
        "plt.xlabel(\"avoidance\",\n",
        "           fontsize=12)\n",
        "plt.ylabel(\"probability of romantic\",\n",
        "           fontsize=12)\n",
        "plt.suptitle(\"Relationships between avoidence and the probability of romantic\",\n",
        "           fontsize=14)\n",
        "sns.despine()\n",
        "plt.show()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "0F32D2815D72494CA83A703235273847",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "## MCMC采样 & 模型诊断"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 17,
      "metadata": {
        "collapsed": false,
        "id": "E1B94310C8CE4BC4A515A07CD13F5011",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Auto-assigning NUTS sampler...\n",
            "Initializing NUTS using jitter+adapt_diag...\n",
            "Multiprocess sampling (4 chains in 4 jobs)\n",
            "NUTS: [beta_0, beta_1]\n"
          ]
        },
        {
          "data": {
            "text/html": [
              "\n",
              "<style>\n",
              "    /* Turns off some styling */\n",
              "    progress {\n",
              "        /* gets rid of default border in Firefox and Opera. */\n",
              "        border: none;\n",
              "        /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
              "        background-size: auto;\n",
              "    }\n",
              "    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
              "        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
              "    }\n",
              "    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
              "        background: #F44336;\n",
              "    }\n",
              "</style>\n"
            ],
            "text/plain": [
              "<IPython.core.display.HTML object>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 7 seconds.\n"
          ]
        }
      ],
      "source": [
        "#===========================\n",
        "#     注意！！！以下代码可能需要运行1-2分钟左右\n",
        "#===========================\n",
        "with log_model1:\n",
        "    # MCMC 近似后验分布\n",
        "    log_model1_trace = pm.sample(\n",
        "                                draws=5000,                   # 使用mcmc方法进行采样，draws为采样次数\n",
        "                                tune=1000,                    # tune为调整采样策略的次数，可以决定这些结果是否要被保留\n",
        "                                chains=4,                     # 链数\n",
        "                                discard_tuned_samples= True,  # tune的结果将在采样结束后被丢弃\n",
        "                                random_seed=84735)\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 18,
      "metadata": {
        "collapsed": false,
        "id": "4C95EA8C806C4C3EAB3418C0228B0E4F",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<img src=\"https://cdn.kesci.com/upload/rt/4C95EA8C806C4C3EAB3418C0228B0E4F/s56vaqcdxp.png\">"
            ],
            "text/plain": [
              "<Figure size 1500x800 with 4 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "az.plot_trace(log_model1_trace,\n",
        "              var_names=[\"beta_0\",\"beta_1\"],\n",
        "              figsize=(15,8),\n",
        "              compact=False)\n",
        "plt.show()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "5641C69DAFAB4E9B8038A60912EAE818",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### 后验参数解释  \n",
        "\n",
        "以下的结果显示：  \n",
        "- $\\beta_0 = -0.48$，那么 $e^{\\beta_0} = 0.63$， 表明 X1 为 0时，个体恋爱的可能性为 0.63。  \n",
        "- $\\beta_1 = -0.16$， $e^{\\beta_0} = 0.86$， 表明回避分数每增加1个单位，个体恋爱的发生比变为之前的0.86倍。  \n",
        "- 然而，$\\beta_1$ 的94%HDI包括0，说明回避分数不能有效预测恋爱发生的概率。 "
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 19,
      "metadata": {
        "collapsed": false,
        "id": "BD9F7DEC55E144B483A01B2F9B0FF428",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>mean</th>\n",
              "      <th>sd</th>\n",
              "      <th>hdi_3%</th>\n",
              "      <th>hdi_97%</th>\n",
              "      <th>mcse_mean</th>\n",
              "      <th>mcse_sd</th>\n",
              "      <th>ess_bulk</th>\n",
              "      <th>ess_tail</th>\n",
              "      <th>r_hat</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>beta_0</th>\n",
              "      <td>-0.479</td>\n",
              "      <td>0.151</td>\n",
              "      <td>-0.753</td>\n",
              "      <td>-0.185</td>\n",
              "      <td>0.001</td>\n",
              "      <td>0.001</td>\n",
              "      <td>20658.0</td>\n",
              "      <td>14853.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>beta_1</th>\n",
              "      <td>-0.164</td>\n",
              "      <td>0.154</td>\n",
              "      <td>-0.451</td>\n",
              "      <td>0.125</td>\n",
              "      <td>0.001</td>\n",
              "      <td>0.001</td>\n",
              "      <td>20607.0</td>\n",
              "      <td>15573.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "         mean     sd  hdi_3%  hdi_97%  mcse_mean  mcse_sd  ess_bulk  ess_tail  \\\n",
              "beta_0 -0.479  0.151  -0.753   -0.185      0.001    0.001   20658.0   14853.0   \n",
              "beta_1 -0.164  0.154  -0.451    0.125      0.001    0.001   20607.0   15573.0   \n",
              "\n",
              "        r_hat  \n",
              "beta_0    1.0  \n",
              "beta_1    1.0  "
            ]
          },
          "execution_count": 19,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "az.summary(log_model1_trace, var_names=[\"beta_0\",\"beta_1\"])"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 20,
      "metadata": {
        "collapsed": false,
        "id": "6F6CCA3CEF014AA5ACA355837DFC388F",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<img src=\"https://cdn.kesci.com/upload/rt/6F6CCA3CEF014AA5ACA355837DFC388F/s56vaq2gnj.png\">"
            ],
            "text/plain": [
              "<Figure size 1472x552 with 2 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "# 通过 np.exp 将 beta 参数进行转换\n",
        "az.plot_posterior(log_model1_trace, var_names=[\"beta_0\",\"beta_1\"], transform = np.exp)\n",
        "plt.show()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "B17FEB700E5146298031E8BD79DBE24B",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "## 后验回归模型  \n",
        "\n",
        "### 绘制后验预测回归线  \n",
        "\n",
        "* 和先验预测模型类似的，通过MCMC采样，也同样生成了对$\\pi$的估计，储存在`posterior`中  \n",
        "\n",
        "* 有4条马尔科夫链，每条链上的采样数为2000，所以对于每一个x，都生成了20000个预测值$\\pi$，这样就对应着20000条后验预测回归线  \n",
        "\n",
        "* 这里我们只需要画出100条即可"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 21,
      "metadata": {
        "collapsed": false,
        "id": "15B3A1AE0247458E94ADE7196A14F0BC",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "\n",
              "            <div>\n",
              "              <div class='xr-header'>\n",
              "                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n",
              "              </div>\n",
              "              <ul class=\"xr-sections group-sections\">\n",
              "              \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_posterior05e1a799-f5f0-40e6-8c3c-7fcdd1e37a0c\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_posterior05e1a799-f5f0-40e6-8c3c-7fcdd1e37a0c\" class = \"xr-section-summary\">posterior</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:  (chain: 4, draw: 5000, obs_id: 174)\n",
              "Coordinates:\n",
              "  * chain    (chain) int64 0 1 2 3\n",
              "  * draw     (draw) int64 0 1 2 3 4 5 6 7 ... 4993 4994 4995 4996 4997 4998 4999\n",
              "  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 166 167 168 169 170 171 172 173\n",
              "Data variables:\n",
              "    beta_0   (chain, draw) float64 -0.8146 -0.6849 -0.4852 ... -0.4692 -0.4692\n",
              "    beta_1   (chain, draw) float64 -0.06269 -0.152 -0.1573 ... -0.1888 -0.1888\n",
              "    mu       (chain, draw, obs_id) float64 -0.8674 -0.7762 ... -0.3536 -0.3241\n",
              "    pi       (chain, draw, obs_id) float64 0.2958 0.3151 ... 0.4125 0.4197\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:18:14.229573\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0\n",
              "    sampling_time:              7.192113637924194\n",
              "    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-c353bacf-9d6f-4a29-a8be-9340c19087f1' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-c353bacf-9d6f-4a29-a8be-9340c19087f1' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>obs_id</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-7a1f9f6e-e76e-4e89-a3df-b99bc1e4f2ad' class='xr-section-summary-in' type='checkbox'  checked><label for='section-7a1f9f6e-e76e-4e89-a3df-b99bc1e4f2ad' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-b8e03148-89c8-4d32-b17c-2588710ea6ae' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b8e03148-89c8-4d32-b17c-2588710ea6ae' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6a8a4104-f5f9-4201-b046-c044abcc171e' class='xr-var-data-in' type='checkbox'><label for='data-6a8a4104-f5f9-4201-b046-c044abcc171e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-1fd7ae41-1052-4f89-8846-8edb33a52b03' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-1fd7ae41-1052-4f89-8846-8edb33a52b03' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-947b45ea-b0dc-414c-947f-1f6d50195721' class='xr-var-data-in' type='checkbox'><label for='data-947b45ea-b0dc-414c-947f-1f6d50195721' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-2049afda-96de-4c3a-bde7-861b39a4be78' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2049afda-96de-4c3a-bde7-861b39a4be78' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-129157a3-a605-435c-afbf-c34477e6587f' class='xr-var-data-in' type='checkbox'><label for='data-129157a3-a605-435c-afbf-c34477e6587f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-161ca6ab-13b3-494a-8d92-58af2fd54288' class='xr-section-summary-in' type='checkbox'  checked><label for='section-161ca6ab-13b3-494a-8d92-58af2fd54288' class='xr-section-summary' >Data variables: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>beta_0</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.8146 -0.6849 ... -0.4692 -0.4692</div><input id='attrs-9d7e3b57-7862-4c3d-b292-3e0c655ebe1c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9d7e3b57-7862-4c3d-b292-3e0c655ebe1c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-95f9bc26-76ad-4ac2-b5b9-e60df9b40b09' class='xr-var-data-in' type='checkbox'><label for='data-95f9bc26-76ad-4ac2-b5b9-e60df9b40b09' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.8145693 , -0.68489222, -0.48518501, ..., -0.4515612 ,\n",
              "        -0.4005887 , -0.53480625],\n",
              "       [-0.36336872, -0.14181324, -0.74865918, ..., -0.42648482,\n",
              "        -0.50778888, -0.50372814],\n",
              "       [-0.31703342, -0.6517594 , -0.6517594 , ..., -0.65617658,\n",
              "        -0.31616026, -0.72058786],\n",
              "       [-0.43136423, -0.35512787, -0.46224556, ..., -0.19888927,\n",
              "        -0.46919501, -0.46919501]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.06269 -0.152 ... -0.1888 -0.1888</div><input id='attrs-adc03b91-76d6-461c-af8e-6829d9de99bc' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-adc03b91-76d6-461c-af8e-6829d9de99bc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-31675817-1ae2-4c47-9c1d-896ad469f415' class='xr-var-data-in' type='checkbox'><label for='data-31675817-1ae2-4c47-9c1d-896ad469f415' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.06269475, -0.15197851, -0.15729474, ..., -0.3011382 ,\n",
              "         0.11434535, -0.29580854],\n",
              "       [-0.15082673,  0.06119222, -0.36142038, ..., -0.47242468,\n",
              "        -0.21935313, -0.06885318],\n",
              "       [-0.0886056 , -0.27813289, -0.27813289, ..., -0.37253077,\n",
              "         0.15640575, -0.32859346],\n",
              "       [-0.06351571, -0.31310975, -0.00170153, ..., -0.14374092,\n",
              "        -0.18880196, -0.18880196]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>mu</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.8674 -0.7762 ... -0.3536 -0.3241</div><input id='attrs-beb1c37e-5ec6-4075-929b-b0b29532b85a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-beb1c37e-5ec6-4075-929b-b0b29532b85a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0dfd701e-7dc1-4e1d-9478-6a549cd8c0be' class='xr-var-data-in' type='checkbox'><label for='data-0dfd701e-7dc1-4e1d-9478-6a549cd8c0be' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[-0.8674291 , -0.77617008, -0.73379982, ..., -0.81202184,\n",
              "         -0.77617008, -0.76639233],\n",
              "        [-0.8130298 , -0.59180858, -0.48909873, ..., -0.67871692,\n",
              "         -0.59180858, -0.56810631],\n",
              "        [-0.61780486, -0.38884529, -0.28254263, ..., -0.47879369,\n",
              "         -0.38884529, -0.3643139 ],\n",
              "        ...,\n",
              "        [-0.70545973, -0.26712038, -0.06360568, ..., -0.43932512,\n",
              "         -0.26712038, -0.22015545],\n",
              "        [-0.30418075, -0.47062283, -0.5478995 , ..., -0.40523487,\n",
              "         -0.47062283, -0.4884559 ],\n",
              "        [-0.7842112 , -0.35362974, -0.15371692, ..., -0.52278674,\n",
              "         -0.35362974, -0.30749601]],\n",
              "\n",
              "       [[-0.4905352 , -0.27099051, -0.16905905, ..., -0.35724021,\n",
              "         -0.27099051, -0.24746787],\n",
              "        [-0.09022026, -0.17929219, -0.22064701, ..., -0.14429965,\n",
              "         -0.17929219, -0.18883561],\n",
              "        [-1.05338341, -0.52729679, -0.28304229, ..., -0.73397367,\n",
              "         -0.52729679, -0.47093036],\n",
              "...\n",
              "        [-0.9702683 , -0.42800932, -0.17624621, ..., -0.64103963,\n",
              "         -0.42800932, -0.36991014],\n",
              "        [-0.18428993, -0.4119555 , -0.51765736, ..., -0.32251545,\n",
              "         -0.4119555 , -0.43634824],\n",
              "        [-0.99763473, -0.51933127, -0.2972618 , ..., -0.7072362 ,\n",
              "         -0.51933127, -0.46808447]],\n",
              "\n",
              "       [[-0.48491621, -0.39246219, -0.34953711, ..., -0.42878341,\n",
              "         -0.39246219, -0.3825564 ],\n",
              "        [-0.61911997, -0.16335473,  0.04825056, ..., -0.34240536,\n",
              "         -0.16335473, -0.11452274],\n",
              "        [-0.46368017, -0.46120341, -0.46005348, ..., -0.46217642,\n",
              "         -0.46120341, -0.46093804],\n",
              "        ...,\n",
              "        [-0.32008149, -0.11085098, -0.01370824, ..., -0.19304868,\n",
              "         -0.11085098, -0.08843342],\n",
              "        [-0.62837954, -0.35355778, -0.22596196, ..., -0.46152347,\n",
              "         -0.35355778, -0.32411259],\n",
              "        [-0.62837954, -0.35355778, -0.22596196, ..., -0.46152347,\n",
              "         -0.35355778, -0.32411259]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>pi</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2958 0.3151 ... 0.4125 0.4197</div><input id='attrs-85494731-f86a-4e76-92c6-d7fce365d5b2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-85494731-f86a-4e76-92c6-d7fce365d5b2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e796fd89-7516-4248-a581-656159c761e2' class='xr-var-data-in' type='checkbox'><label for='data-e796fd89-7516-4248-a581-656159c761e2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[0.29578953, 0.31514591, 0.32436144, ..., 0.30745982,\n",
              "         0.31514591, 0.31726003],\n",
              "        [0.30724524, 0.35621999, 0.38010591, ..., 0.33654773,\n",
              "         0.35621999, 0.3616739 ],\n",
              "        [0.35028087, 0.40399531, 0.42983053, ..., 0.38253702,\n",
              "         0.40399531, 0.40991569],\n",
              "        ...,\n",
              "        [0.33060285, 0.43361417, 0.48410394, ..., 0.39190179,\n",
              "         0.43361417, 0.44518237],\n",
              "        [0.42453578, 0.38446884, 0.36635188, ..., 0.40005526,\n",
              "         0.38446884, 0.38025738],\n",
              "        [0.31341299, 0.4125025 , 0.46164626, ..., 0.37220083,\n",
              "         0.4125025 , 0.42372605]],\n",
              "\n",
              "       [[0.3797675 , 0.43266394, 0.45783561, ..., 0.4116278 ,\n",
              "         0.43266394, 0.43844684],\n",
              "        [0.47746022, 0.45529664, 0.44506096, ..., 0.46398756,\n",
              "         0.45529664, 0.45293088],\n",
              "        [0.25857592, 0.37114759, 0.42970808, ..., 0.32432334,\n",
              "         0.37114759, 0.38439606],\n",
              "...\n",
              "        [0.27482703, 0.39460179, 0.45605215, ..., 0.34501157,\n",
              "         0.39460179, 0.40856274],\n",
              "        [0.45405747, 0.39844332, 0.37340018, ..., 0.42006283,\n",
              "         0.39844332, 0.39261145],\n",
              "        [0.26940671, 0.37300862, 0.426227  , ..., 0.33020983,\n",
              "         0.37300862, 0.38506973]],\n",
              "\n",
              "       [[0.38109191, 0.40312472, 0.41349467, ..., 0.39441688,\n",
              "         0.40312472, 0.40551047],\n",
              "        [0.34998163, 0.45925189, 0.5120603 , ..., 0.41522531,\n",
              "         0.45925189, 0.47140057],\n",
              "        [0.38611315, 0.38670038, 0.38697314, ..., 0.38646964,\n",
              "         0.38670038, 0.38676332],\n",
              "        ...,\n",
              "        [0.42065589, 0.4723156 , 0.49657299, ..., 0.45188716,\n",
              "         0.4723156 , 0.47790604],\n",
              "        [0.34787806, 0.41251994, 0.44374865, ..., 0.38662448,\n",
              "         0.41251994, 0.41967381],\n",
              "        [0.34787806, 0.41251994, 0.44374865, ..., 0.38662448,\n",
              "         0.41251994, 0.41967381]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-6a0c24be-c73b-4a0e-b97f-3fac2e41b5ae' class='xr-section-summary-in' type='checkbox'  checked><label for='section-6a0c24be-c73b-4a0e-b97f-3fac2e41b5ae' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:18:14.229573</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>7.192113637924194</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_sample_stats129aab57-3438-426d-ad7b-01676e89cfd3\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_sample_stats129aab57-3438-426d-ad7b-01676e89cfd3\" class = \"xr-section-summary\">sample_stats</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:                (chain: 4, draw: 5000)\n",
              "Coordinates:\n",
              "  * chain                  (chain) int64 0 1 2 3\n",
              "  * draw                   (draw) int64 0 1 2 3 4 5 ... 4995 4996 4997 4998 4999\n",
              "Data variables: (12/17)\n",
              "    max_energy_error       (chain, draw) float64 0.9762 -0.5669 ... 0.4145\n",
              "    tree_depth             (chain, draw) int64 2 1 2 2 2 2 2 1 ... 1 2 2 2 2 2 2\n",
              "    lp                     (chain, draw) float64 -118.2 -116.4 ... -115.4 -115.4\n",
              "    smallest_eigval        (chain, draw) float64 nan nan nan nan ... nan nan nan\n",
              "    energy                 (chain, draw) float64 118.4 117.7 ... 116.6 116.2\n",
              "    index_in_trajectory    (chain, draw) int64 -1 -1 -1 -1 2 2 ... 1 2 -1 3 -1 0\n",
              "    ...                     ...\n",
              "    acceptance_rate        (chain, draw) float64 0.4835 1.0 1.0 ... 1.0 0.7393\n",
              "    step_size              (chain, draw) float64 1.181 1.181 ... 1.039 1.039\n",
              "    largest_eigval         (chain, draw) float64 nan nan nan nan ... nan nan nan\n",
              "    perf_counter_start     (chain, draw) float64 3.032e+06 ... 3.032e+06\n",
              "    perf_counter_diff      (chain, draw) float64 0.0009529 ... 0.0005973\n",
              "    reached_max_treedepth  (chain, draw) bool False False False ... False False\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:18:14.285150\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0\n",
              "    sampling_time:              7.192113637924194\n",
              "    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-f50d26ce-40a5-4cd6-9d0b-db3dbe055c45' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-f50d26ce-40a5-4cd6-9d0b-db3dbe055c45' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-99d670d8-6a62-428e-9847-bfc10372e0da' class='xr-section-summary-in' type='checkbox'  checked><label for='section-99d670d8-6a62-428e-9847-bfc10372e0da' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-1b203cf0-8edc-4b90-b16d-8bb1358bd170' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-1b203cf0-8edc-4b90-b16d-8bb1358bd170' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-06634992-8daa-4939-852d-30b2759b177a' class='xr-var-data-in' type='checkbox'><label for='data-06634992-8daa-4939-852d-30b2759b177a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-010954c2-9cec-42b0-b60e-33495ad53558' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-010954c2-9cec-42b0-b60e-33495ad53558' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ed322acb-78b7-4f9d-9840-242ba59e8c2d' class='xr-var-data-in' type='checkbox'><label for='data-ed322acb-78b7-4f9d-9840-242ba59e8c2d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-db961a9e-0bd8-49e4-92d1-f0c5e4bf361b' class='xr-section-summary-in' type='checkbox'  ><label for='section-db961a9e-0bd8-49e4-92d1-f0c5e4bf361b' class='xr-section-summary' >Data variables: <span>(17)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>max_energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.9762 -0.5669 ... -0.5822 0.4145</div><input id='attrs-e6e80bb2-dc6b-4967-8eba-6beff95560c7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e6e80bb2-dc6b-4967-8eba-6beff95560c7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ed6e2908-ab71-42a0-a279-37027f0d58a0' class='xr-var-data-in' type='checkbox'><label for='data-ed6e2908-ab71-42a0-a279-37027f0d58a0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.9761532 , -0.56687459, -0.31912494, ...,  0.41282585,\n",
              "         0.40402376,  0.39518582],\n",
              "       [-0.1406788 ,  1.33737233, -1.20508901, ...,  0.85927513,\n",
              "        -0.940784  ,  0.06722142],\n",
              "       [ 0.35421832, -0.17705815,  0.20226248, ..., -0.46595582,\n",
              "        -0.52617444, -0.3493382 ],\n",
              "       [ 0.07588791,  0.31262774, -0.15610962, ...,  1.50445159,\n",
              "        -0.58215104,  0.41452272]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tree_depth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>2 1 2 2 2 2 2 1 ... 1 1 2 2 2 2 2 2</div><input id='attrs-30fa706e-3384-42f3-9594-425fd9c8cb38' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-30fa706e-3384-42f3-9594-425fd9c8cb38' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-946c6c35-d763-4e2b-9213-1b529762d3cf' class='xr-var-data-in' type='checkbox'><label for='data-946c6c35-d763-4e2b-9213-1b529762d3cf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[2, 1, 2, ..., 2, 2, 2],\n",
              "       [2, 2, 2, ..., 2, 1, 2],\n",
              "       [2, 2, 1, ..., 2, 2, 2],\n",
              "       [2, 2, 2, ..., 2, 2, 2]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lp</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-118.2 -116.4 ... -115.4 -115.4</div><input id='attrs-a54c8cfb-0c53-4b44-8766-c02905bd4de6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a54c8cfb-0c53-4b44-8766-c02905bd4de6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b81ce748-ad13-4edc-a252-d3434e2943a3' class='xr-var-data-in' type='checkbox'><label for='data-b81ce748-ad13-4edc-a252-d3434e2943a3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-118.15253665, -116.35425205, -115.36722987, ..., -115.82195283,\n",
              "        -117.13966251, -115.83654956],\n",
              "       [-115.6396089 , -118.93663923, -117.7472907 , ..., -117.55214597,\n",
              "        -115.46681503, -115.5656266 ],\n",
              "       [-116.01784464, -116.3266338 , -116.3266338 , ..., -116.97488518,\n",
              "        -118.13756599, -117.21682271],\n",
              "       [-115.60028125, -116.23580285, -115.91173239, ..., -117.08895024,\n",
              "        -115.38471763, -115.38471763]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smallest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-70f5574e-bfb4-4d2b-846c-5d34da485357' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-70f5574e-bfb4-4d2b-846c-5d34da485357' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-202cfb21-e5e9-47c8-9625-8b6b11746d5c' class='xr-var-data-in' type='checkbox'><label for='data-202cfb21-e5e9-47c8-9625-8b6b11746d5c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>118.4 117.7 116.1 ... 116.6 116.2</div><input id='attrs-8e5bc307-e003-4280-bd82-bbae76ca929e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8e5bc307-e003-4280-bd82-bbae76ca929e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1d3e4636-1c38-457b-a5a6-489c497b3416' class='xr-var-data-in' type='checkbox'><label for='data-1d3e4636-1c38-457b-a5a6-489c497b3416' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[118.43726662, 117.71626146, 116.10952833, ..., 116.74580903,\n",
              "        117.63696013, 117.66621547],\n",
              "       [116.09148738, 118.94618844, 118.68273435, ..., 117.84033694,\n",
              "        116.63795902, 115.67682795],\n",
              "       [116.52041727, 116.35076992, 117.02570708, ..., 118.87399922,\n",
              "        118.18925259, 118.97599494],\n",
              "       [115.89899915, 116.45796757, 116.66125457, ..., 120.25079346,\n",
              "        116.6300189 , 116.20951054]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>index_in_trajectory</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>-1 -1 -1 -1 2 2 ... 1 2 -1 3 -1 0</div><input id='attrs-3e7d7f61-8408-4c3f-88b4-39974a33f549' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3e7d7f61-8408-4c3f-88b4-39974a33f549' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-820cd169-a515-4ca5-812c-f8957e637f3c' class='xr-var-data-in' type='checkbox'><label for='data-820cd169-a515-4ca5-812c-f8957e637f3c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-1, -1, -1, ...,  2, -2,  1],\n",
              "       [ 2,  1, -2, ..., -1, -1, -3],\n",
              "       [-2, -3,  0, ...,  2, -3, -2],\n",
              "       [-3,  1, -2, ...,  3, -1,  0]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>n_steps</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.0 1.0 3.0 3.0 ... 3.0 3.0 3.0 3.0</div><input id='attrs-5f3992cf-f429-413d-bb90-1f2472de1d8a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5f3992cf-f429-413d-bb90-1f2472de1d8a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fc959fb5-0402-4875-a013-e7b4571cf26f' class='xr-var-data-in' type='checkbox'><label for='data-fc959fb5-0402-4875-a013-e7b4571cf26f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[3., 1., 3., ..., 3., 3., 3.],\n",
              "       [3., 3., 3., ..., 3., 1., 3.],\n",
              "       [3., 3., 1., ..., 3., 3., 3.],\n",
              "       [3., 3., 3., ..., 3., 3., 3.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>diverging</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-adefc552-d319-46a4-ac7d-0f9cf6bea00b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-adefc552-d319-46a4-ac7d-0f9cf6bea00b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b08a9e5c-5b43-4f50-8a98-783a22cfbc9d' class='xr-var-data-in' type='checkbox'><label for='data-b08a9e5c-5b43-4f50-8a98-783a22cfbc9d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>process_time_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0009531 0.0005062 ... 0.0005974</div><input id='attrs-6630d867-704c-4177-b904-93ef923ebbd4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6630d867-704c-4177-b904-93ef923ebbd4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-514d5ef2-3d03-451b-941e-931ab4b07748' class='xr-var-data-in' type='checkbox'><label for='data-514d5ef2-3d03-451b-941e-931ab4b07748' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00095313, 0.00050618, 0.00124538, ..., 0.0006048 , 0.00061033,\n",
              "        0.00056202],\n",
              "       [0.00099295, 0.00099939, 0.00101067, ..., 0.00061081, 0.00031945,\n",
              "        0.00058481],\n",
              "       [0.00061531, 0.00058284, 0.00031622, ..., 0.00060114, 0.00060868,\n",
              "        0.0006058 ],\n",
              "       [0.00059268, 0.00065066, 0.0006156 , ..., 0.00059002, 0.00062388,\n",
              "        0.00059741]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.919 -0.5669 ... -0.5822 0.0</div><input id='attrs-98a980e1-4056-41b4-aa8a-7662b26231e3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-98a980e1-4056-41b4-aa8a-7662b26231e3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a7d92721-820d-48ac-9e56-900725ba593a' class='xr-var-data-in' type='checkbox'><label for='data-a7d92721-820d-48ac-9e56-900725ba593a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.91895573, -0.56687459, -0.31912494, ...,  0.06210555,\n",
              "         0.40402376, -0.37947623],\n",
              "       [-0.1406788 ,  1.33737233, -0.42650396, ...,  0.80203627,\n",
              "        -0.940784  ,  0.04809164],\n",
              "       [ 0.18704023,  0.09744997,  0.        , ..., -0.37416599,\n",
              "         0.44126571, -0.3493382 ],\n",
              "       [ 0.00229261,  0.25216459, -0.11560866, ...,  0.21692852,\n",
              "        -0.58215104,  0.        ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size_bar</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.243 1.243 1.243 ... 1.16 1.16</div><input id='attrs-d722d411-a449-4da2-8adc-7047a87160de' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d722d411-a449-4da2-8adc-7047a87160de' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6e292745-1b5d-48a0-8773-c7f4308d0774' class='xr-var-data-in' type='checkbox'><label for='data-6e292745-1b5d-48a0-8773-c7f4308d0774' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.24341251, 1.24341251, 1.24341251, ..., 1.24341251, 1.24341251,\n",
              "        1.24341251],\n",
              "       [1.14507487, 1.14507487, 1.14507487, ..., 1.14507487, 1.14507487,\n",
              "        1.14507487],\n",
              "       [1.12152271, 1.12152271, 1.12152271, ..., 1.12152271, 1.12152271,\n",
              "        1.12152271],\n",
              "       [1.15967085, 1.15967085, 1.15967085, ..., 1.15967085, 1.15967085,\n",
              "        1.15967085]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>acceptance_rate</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.4835 1.0 1.0 ... 1.0 0.7393</div><input id='attrs-58e0d6a5-072c-490d-befb-c666200a8ba6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-58e0d6a5-072c-490d-befb-c666200a8ba6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8158a5d8-026e-4b12-8899-a8b68f3910e9' class='xr-var-data-in' type='checkbox'><label for='data-8158a5d8-026e-4b12-8899-a8b68f3910e9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.48345839, 1.        , 1.        , ..., 0.78874586, 0.80747745,\n",
              "        0.89118496],\n",
              "       [0.99007365, 0.56151608, 1.        , ..., 0.62396129, 1.        ,\n",
              "        0.95680671],\n",
              "       [0.8206355 , 0.96192531, 0.81688048, ..., 0.99236423, 0.82688818,\n",
              "        0.92656315],\n",
              "       [0.95374675, 0.79650186, 0.99204497, ..., 0.47662515, 1.        ,\n",
              "        0.73933241]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.181 1.181 1.181 ... 1.039 1.039</div><input id='attrs-31c3d1e4-b362-4422-ab6d-60b205e81f5d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-31c3d1e4-b362-4422-ab6d-60b205e81f5d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ac68ae37-3ab8-4811-9bd2-faeb1a20064a' class='xr-var-data-in' type='checkbox'><label for='data-ac68ae37-3ab8-4811-9bd2-faeb1a20064a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.18119476, 1.18119476, 1.18119476, ..., 1.18119476, 1.18119476,\n",
              "        1.18119476],\n",
              "       [0.95657423, 0.95657423, 0.95657423, ..., 0.95657423, 0.95657423,\n",
              "        0.95657423],\n",
              "       [1.1997429 , 1.1997429 , 1.1997429 , ..., 1.1997429 , 1.1997429 ,\n",
              "        1.1997429 ],\n",
              "       [1.03905335, 1.03905335, 1.03905335, ..., 1.03905335, 1.03905335,\n",
              "        1.03905335]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>largest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-5957ac1d-9449-4c44-8a1e-d2aa2bee6841' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5957ac1d-9449-4c44-8a1e-d2aa2bee6841' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bbb9028e-6f28-40a2-8870-5cefd83b9acd' class='xr-var-data-in' type='checkbox'><label for='data-bbb9028e-6f28-40a2-8870-5cefd83b9acd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_start</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.032e+06 3.032e+06 ... 3.032e+06</div><input id='attrs-832aa1f4-43c0-4a51-96e9-7a26298ecbf2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-832aa1f4-43c0-4a51-96e9-7a26298ecbf2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-09d14b23-6ec1-41bb-9891-c30b80b2ff61' class='xr-var-data-in' type='checkbox'><label for='data-09d14b23-6ec1-41bb-9891-c30b80b2ff61' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[3032075.7719216 , 3032075.77316131, 3032075.77391473, ...,\n",
              "        3032081.17875428, 3032081.17952525, 3032081.18028967],\n",
              "       [3032075.72682757, 3032075.72808085, 3032075.72931051, ...,\n",
              "        3032080.81581945, 3032080.81659805, 3032080.81709057],\n",
              "       [3032075.66460019, 3032075.66539325, 3032075.66615679, ...,\n",
              "        3032081.26598944, 3032081.26675685, 3032081.26753005],\n",
              "       [3032075.77415694, 3032075.77492657, 3032075.77573816, ...,\n",
              "        3032081.64506416, 3032081.64582459, 3032081.64662164]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0009529 0.0005056 ... 0.0005973</div><input id='attrs-f84455f7-3c8b-4643-b527-32d96f41cb12' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f84455f7-3c8b-4643-b527-32d96f41cb12' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-99bcfc08-680e-4f56-89a2-7424c1922283' class='xr-var-data-in' type='checkbox'><label for='data-99bcfc08-680e-4f56-89a2-7424c1922283' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00095289, 0.00050557, 0.02726595, ..., 0.00060449, 0.00061051,\n",
              "        0.00056179],\n",
              "       [0.00099271, 0.00099928, 0.00101005, ..., 0.00061041, 0.00031918,\n",
              "        0.00058437],\n",
              "       [0.00061511, 0.00058242, 0.00031561, ..., 0.00060067, 0.00060826,\n",
              "        0.00060569],\n",
              "       [0.00059227, 0.00064994, 0.00061541, ..., 0.00058961, 0.00062344,\n",
              "        0.00059732]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>reached_max_treedepth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-e8f458b1-847f-405f-b570-72f79ceb0673' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e8f458b1-847f-405f-b570-72f79ceb0673' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8bec69d7-0184-46d8-8734-6474f4de5acd' class='xr-var-data-in' type='checkbox'><label for='data-8bec69d7-0184-46d8-8734-6474f4de5acd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-ee6da7e4-1a5c-4cce-b545-51348661f8ab' class='xr-section-summary-in' type='checkbox'  checked><label for='section-ee6da7e4-1a5c-4cce-b545-51348661f8ab' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:18:14.285150</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>7.192113637924194</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_observed_data12931c51-9f97-494a-8b82-dd058df78773\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_observed_data12931c51-9f97-494a-8b82-dd058df78773\" class = \"xr-section-summary\">observed_data</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:  (obs_id: 174)\n",
              "Coordinates:\n",
              "  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 166 167 168 169 170 171 172 173\n",
              "Data variables:\n",
              "    y_est    (obs_id) int64 0 0 0 0 1 1 0 1 0 1 1 1 ... 1 1 1 0 0 0 0 0 0 0 0 1\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:18:14.299177\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-ba22567f-1125-4c17-bacd-81c8fdb21415' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-ba22567f-1125-4c17-bacd-81c8fdb21415' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-0ad16536-ce23-4d4c-9c7a-e1d9dc4ae91a' class='xr-section-summary-in' type='checkbox'  checked><label for='section-0ad16536-ce23-4d4c-9c7a-e1d9dc4ae91a' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-7782ec3e-1daa-46da-b589-ef32faf7fa77' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7782ec3e-1daa-46da-b589-ef32faf7fa77' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bb7aa532-e8de-4e3e-b771-a9cdc6f23bb8' class='xr-var-data-in' type='checkbox'><label for='data-bb7aa532-e8de-4e3e-b771-a9cdc6f23bb8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-07228c6f-753a-4f9d-b9bd-47826c9b6bf3' class='xr-section-summary-in' type='checkbox'  checked><label for='section-07228c6f-753a-4f9d-b9bd-47826c9b6bf3' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>y_est</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 0 0 0 1 1 0 1 ... 0 0 0 0 0 0 0 1</div><input id='attrs-648420ab-6ba6-4424-aefa-a878b91003aa' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-648420ab-6ba6-4424-aefa-a878b91003aa' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1beae56a-4bb7-444a-a13c-51e3544e5128' class='xr-var-data-in' type='checkbox'><label for='data-1beae56a-4bb7-444a-a13c-51e3544e5128' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,\n",
              "       1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1,\n",
              "       0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0,\n",
              "       1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1,\n",
              "       0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,\n",
              "       0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-9d8d4d91-0ca5-4b55-9166-18e0f64d9197' class='xr-section-summary-in' type='checkbox'  checked><label for='section-9d8d4d91-0ca5-4b55-9166-18e0f64d9197' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:18:14.299177</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_constant_datadf068f7b-3bef-46d9-af5e-467ff62af8aa\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_constant_datadf068f7b-3bef-46d9-af5e-467ff62af8aa\" class = \"xr-section-summary\">constant_data</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:    (obs_id: 174)\n",
              "Coordinates:\n",
              "  * obs_id     (obs_id) int64 0 1 2 3 4 5 6 7 ... 167 168 169 170 171 172 173\n",
              "Data variables:\n",
              "    avoidance  (obs_id) float64 0.8431 -0.6125 -1.288 ... -0.6125 -0.7684\n",
              "    y          (obs_id) int32 0 0 0 0 1 1 0 1 0 1 1 1 ... 1 1 0 0 0 0 0 0 0 0 1\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:18:14.303960\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-eb85a74b-fac0-4702-8e2e-633af79f8ca7' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-eb85a74b-fac0-4702-8e2e-633af79f8ca7' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-f1d24177-fabb-45cb-aa2d-b6767dd33d71' class='xr-section-summary-in' type='checkbox'  checked><label for='section-f1d24177-fabb-45cb-aa2d-b6767dd33d71' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-57f7f071-37f2-4c7f-aa97-c0880092f990' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-57f7f071-37f2-4c7f-aa97-c0880092f990' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b9429bb4-e9d5-41a4-91d1-32e702865b84' class='xr-var-data-in' type='checkbox'><label for='data-b9429bb4-e9d5-41a4-91d1-32e702865b84' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-7604346c-2197-4793-8552-7b5db48d3c5e' class='xr-section-summary-in' type='checkbox'  checked><label for='section-7604346c-2197-4793-8552-7b5db48d3c5e' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>avoidance</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.8431 -0.6125 ... -0.6125 -0.7684</div><input id='attrs-6afbe015-a093-4595-ad23-5735b2144f8b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6afbe015-a093-4595-ad23-5735b2144f8b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-62fd7b69-1f75-4a35-b488-01503763a16c' class='xr-var-data-in' type='checkbox'><label for='data-62fd7b69-1f75-4a35-b488-01503763a16c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0.84312961, -0.61247899, -1.28829727,  0.47922746, -0.61247899,\n",
              "        1.46696187, -1.02836716, -0.76843705, -0.97638114, -0.30056286,\n",
              "        0.79114359,  0.79114359, -1.02836716, -0.04063275, -0.04063275,\n",
              "        0.84312961, -1.08035318, -1.13233921,  0.63518553,  0.37525542,\n",
              "        0.68717155, -0.04063275, -2.01610157, -1.96411555, -0.30056286,\n",
              "       -1.34028329,  1.93483607, -0.24857684,  0.73915757, -0.24857684,\n",
              "        0.79114359, -0.24857684, -0.35254888, -0.56049297,  2.87058445,\n",
              "       -0.30056286, -1.18432523,  0.47922746,  0.84312961, -1.54822738,\n",
              "        0.16731133,  1.10305972, -0.50850695,  0.06333929,  0.79114359,\n",
              "        1.36298983,  0.06333929, -0.35254888,  0.63518553,  0.11532531,\n",
              "       -1.65219942, -0.82042308, -0.82042308, -0.19659082, -0.30056286,\n",
              "        1.25901779,  1.0510737 , -0.56049297, -0.97638114, -1.91212953,\n",
              "        0.58319951,  0.21929736,  0.16731133,  0.42724144, -0.8724091 ,\n",
              "        0.84312961,  0.58319951,  0.53121348,  0.27128338,  0.79114359,\n",
              "        0.47922746, -1.34028329,  0.3232694 , -0.4045349 ,  1.88285005,\n",
              "       -0.92439512, -0.97638114, -0.76843705,  1.46696187, -0.35254888,\n",
              "       -0.82042308, -1.39226931,  0.84312961,  0.53121348, -0.66446501,\n",
              "        0.53121348,  0.84312961,  0.06333929, -0.8724091 , -1.49624136,\n",
              "       -0.8724091 , -0.4045349 ,  2.29873822, -0.35254888, -1.39226931,\n",
              "       -0.82042308,  0.79114359,  0.94710166,  0.79114359,  0.79114359,\n",
              "        2.09079413, -1.34028329, -1.70418544,  0.79114359, -0.1446048 ,\n",
              "       -0.19659082,  0.58319951,  1.10305972,  0.84312961,  0.27128338,\n",
              "       -1.13233921, -0.61247899,  0.16731133, -0.19659082, -0.30056286,\n",
              "        0.27128338,  0.11532531,  0.11532531,  0.79114359, -0.92439512,\n",
              "       -1.80815749,  0.37525542, -0.04063275,  1.15504574, -1.28829727,\n",
              "       -1.28829727, -1.08035318, -1.44425533, -0.30056286, -1.23631125,\n",
              "        0.94710166,  0.68717155,  0.01135327, -0.04063275,  0.79114359,\n",
              "       -0.04063275,  1.0510737 , -0.71645103,  0.3232694 ,  0.06333929,\n",
              "        0.79114359, -1.70418544, -0.1446048 ,  1.98682209,  0.79114359,\n",
              "        2.09079413, -1.91212953, -1.44425533,  0.63518553, -0.92439512,\n",
              "        0.68717155, -0.50850695, -1.28829727,  3.07852854, -0.09261877,\n",
              "        1.778878  , -0.35254888, -0.92439512,  0.53121348, -0.92439512,\n",
              "       -0.56049297, -0.4045349 ,  0.68717155,  2.29873822,  0.53121348,\n",
              "        1.0510737 ,  0.58319951,  1.31100381,  0.21929736,  0.16731133,\n",
              "        0.58319951, -0.04063275, -0.61247899, -0.76843705])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>y</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>0 0 0 0 1 1 0 1 ... 0 0 0 0 0 0 0 1</div><input id='attrs-77f52c1a-a74d-41f5-afdd-ea254c2f17a0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-77f52c1a-a74d-41f5-afdd-ea254c2f17a0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fc9b0891-ae29-4472-ad11-2c8f878e97a6' class='xr-var-data-in' type='checkbox'><label for='data-fc9b0891-ae29-4472-ad11-2c8f878e97a6' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,\n",
              "       1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1,\n",
              "       0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0,\n",
              "       1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1,\n",
              "       0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,\n",
              "       0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1],\n",
              "      dtype=int32)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-021498e6-c57a-4224-9ada-83089c643253' class='xr-section-summary-in' type='checkbox'  checked><label for='section-021498e6-c57a-4224-9ada-83089c643253' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:18:14.303960</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "              </ul>\n",
              "            </div>\n",
              "            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-sections.group-sections {\n",
              "  grid-template-columns: auto;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt, dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              ".xr-wrap{width:700px!important;} </style>"
            ],
            "text/plain": [
              "Inference data with groups:\n",
              "\t> posterior\n",
              "\t> sample_stats\n",
              "\t> observed_data\n",
              "\t> constant_data"
            ]
          },
          "execution_count": 21,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "log_model1_trace"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 22,
      "metadata": {
        "collapsed": false,
        "id": "3EB1ECAAC1814F4E9F7EEF2CA69E176B",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<img src=\"https://cdn.kesci.com/upload/rt/3EB1ECAAC1814F4E9F7EEF2CA69E176B/s56vcqwpzg.png\">"
            ],
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "#对于一次抽样，可以绘制出一条曲线，结合循环绘制出50条曲线\n",
        "for i in range(100):\n",
        "    sns.lineplot(x = log_model1_trace.constant_data[\"avoidance\"],\n",
        "            y = log_model1_trace.posterior[\"pi\"].stack(sample=(\"chain\", \"draw\"))[:,i], \n",
        "            c=\"grey\",\n",
        "            alpha=0.4)\n",
        "#设置x、y轴标题和总标题    \n",
        "plt.xlabel(\"avoidance\",\n",
        "           fontsize=12)\n",
        "plt.ylabel(\"probability of romantic\",\n",
        "           fontsize=12)\n",
        "plt.suptitle(\"100 posterior plausible models\",\n",
        "           fontsize=14)\n",
        "sns.despine()\n",
        "plt.show()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "73C1BA70298647AC9C16BB245535CE4F",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "#### 使用`az.plot_hdi`进行绘图  \n",
        "* 或者我们也可以借助`az.plot_hdi`，画出每个自变量对应的恋爱概率$\\pi$94%hdi值"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 23,
      "metadata": {
        "collapsed": false,
        "id": "CEDE992E95B142A3813290495AA47927",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "fragment"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<img src=\"https://cdn.kesci.com/upload/rt/CEDE992E95B142A3813290495AA47927/s56vcriyee.png\">"
            ],
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "#画出每个自变量对应的恋爱概率94%hdi值\n",
        "az.plot_hdi(\n",
        "    df.avoidance_r,\n",
        "    log_model1_trace.posterior.pi,\n",
        "    hdi_prob=0.95,\n",
        "    fill_kwargs={\"alpha\": 0.25, \"linewidth\": 0},\n",
        "    color=\"C1\"\n",
        ")\n",
        "#得到每个自变量对应的恋爱概率均值，并使用sns.lineplot连成一条光滑的曲线\n",
        "post_mean = log_model1_trace.posterior.pi.mean((\"chain\", \"draw\"))\n",
        "sns.lineplot(x = df.avoidance_r, \n",
        "             y= post_mean, \n",
        "             label=\"posterior mean\", \n",
        "             color=\"C1\")\n",
        "#绘制真实数据散点图\n",
        "sns.scatterplot(x = df.avoidance_r, \n",
        "                y= df.romantic,label=\"observed data\", \n",
        "                color='#C00000', \n",
        "                alpha=0.5)\n",
        "#设置图例位置\n",
        "plt.legend(loc=\"upper right\",\n",
        "           bbox_to_anchor=(1.5, 1),\n",
        "           fontsize=12)\n",
        "sns.despine()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "13F22A55B98941A28FB48F0F74721B34",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "## 对新数据进行预测&分类  \n",
        "\n",
        "* 除了对当前数据结果做出解释，我们也可以使用当前的参数预测值，对新数据做出预测  \n",
        "\n",
        "* 比如，当回避分数位于一个标准差时，即 $X_{i1}=1$时，个体是处在恋爱情况还是单身情况  \n",
        "\n",
        "\n",
        "$$  \n",
        "Y | \\beta_0, \\beta_1 \\sim \\text{Bern}(\\pi) \\;\\; \\text{ with } \\;\\; \\log\\left( \\frac{\\pi}{1-\\pi}\\right) = \\beta_0 + \\beta_1 * 1  \n",
        "$$  \n",
        "\n",
        "* 我们使用`pm.set_data`传入新的数据，使用`pm.sample_posterior_predictive`对新数据生成后验预测值  \n",
        "    * 假设我们传入的数据是(X=1, Y=0)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 24,
      "metadata": {
        "collapsed": false,
        "id": "64A081C7A37142D08D4CF0C5A6759743",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Sampling: [y_est]\n"
          ]
        },
        {
          "data": {
            "text/html": [
              "\n",
              "<style>\n",
              "    /* Turns off some styling */\n",
              "    progress {\n",
              "        /* gets rid of default border in Firefox and Opera. */\n",
              "        border: none;\n",
              "        /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
              "        background-size: auto;\n",
              "    }\n",
              "    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
              "        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
              "    }\n",
              "    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
              "        background: #F44336;\n",
              "    }\n",
              "</style>\n"
            ],
            "text/plain": [
              "<IPython.core.display.HTML object>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "pred_coords ={\"obs_id\":range(174,175)} \n",
        "\n",
        "with log_model1:\n",
        "    # 传入数据\n",
        "    pm.set_data({\"avoidance\": np.array([1]),\n",
        "                 \"y\": np.array([0])},\n",
        "                coords=pred_coords\n",
        "                )   \n",
        "    # 生成对因变量的预测\n",
        "    prediction = pm.sample_posterior_predictive(log_model1_trace, \n",
        "                                                var_names=[\"y_est\"],\n",
        "                                                predictions=True,\n",
        "                                                extend_inferencedata=True,\n",
        "                                                random_seed=84735)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "D0910B70AE8A46708CC84A7DAD4CEBBE",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "* 预测结果储存在`prediction.predictions`中  \n",
        "\n",
        "* 我们可以将预测结果提取出来，并统计其中 0 和 1的个数"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 25,
      "metadata": {
        "collapsed": false,
        "id": "6EBA8428D86B4C1D95BC1AE854B36290",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "\n",
              "            <div>\n",
              "              <div class='xr-header'>\n",
              "                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n",
              "              </div>\n",
              "              <ul class=\"xr-sections group-sections\">\n",
              "              \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_posterior7707ac8d-86c2-4d45-b098-da317669f339\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_posterior7707ac8d-86c2-4d45-b098-da317669f339\" class = \"xr-section-summary\">posterior</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:  (chain: 4, draw: 5000, obs_id: 174)\n",
              "Coordinates:\n",
              "  * chain    (chain) int64 0 1 2 3\n",
              "  * draw     (draw) int64 0 1 2 3 4 5 6 7 ... 4993 4994 4995 4996 4997 4998 4999\n",
              "  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 166 167 168 169 170 171 172 173\n",
              "Data variables:\n",
              "    beta_0   (chain, draw) float64 -0.8146 -0.6849 -0.4852 ... -0.4692 -0.4692\n",
              "    beta_1   (chain, draw) float64 -0.06269 -0.152 -0.1573 ... -0.1888 -0.1888\n",
              "    mu       (chain, draw, obs_id) float64 -0.8674 -0.7762 ... -0.3536 -0.3241\n",
              "    pi       (chain, draw, obs_id) float64 0.2958 0.3151 ... 0.4125 0.4197\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:18:14.229573\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0\n",
              "    sampling_time:              7.192113637924194\n",
              "    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-a1249490-fa18-409d-a210-c2445eb7bfe6' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-a1249490-fa18-409d-a210-c2445eb7bfe6' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>obs_id</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-f4001828-b425-4d76-9daa-5224c98ee598' class='xr-section-summary-in' type='checkbox'  checked><label for='section-f4001828-b425-4d76-9daa-5224c98ee598' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-a80ece1f-2750-4761-a76e-2a9f766954e2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a80ece1f-2750-4761-a76e-2a9f766954e2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fdc82279-4c9f-40c3-a016-37e520f9e229' class='xr-var-data-in' type='checkbox'><label for='data-fdc82279-4c9f-40c3-a016-37e520f9e229' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-df0fc195-e0d6-44dd-8f07-bcc422046026' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-df0fc195-e0d6-44dd-8f07-bcc422046026' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a2552ee6-1888-4cb8-ad67-16f9ba5cb089' class='xr-var-data-in' type='checkbox'><label for='data-a2552ee6-1888-4cb8-ad67-16f9ba5cb089' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-75f2317d-26d8-4c70-bd47-a544fb821c53' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-75f2317d-26d8-4c70-bd47-a544fb821c53' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b5a98625-1bac-4a70-b661-6a3e9ea39429' class='xr-var-data-in' type='checkbox'><label for='data-b5a98625-1bac-4a70-b661-6a3e9ea39429' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-5d473733-0c7a-4971-b40f-64fd0b5ce276' class='xr-section-summary-in' type='checkbox'  checked><label for='section-5d473733-0c7a-4971-b40f-64fd0b5ce276' class='xr-section-summary' >Data variables: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>beta_0</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.8146 -0.6849 ... -0.4692 -0.4692</div><input id='attrs-ded3180e-b6a1-4573-a6d8-e2e5d8d614ed' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ded3180e-b6a1-4573-a6d8-e2e5d8d614ed' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-331ef31d-53b8-4349-8794-aef35959bc4d' class='xr-var-data-in' type='checkbox'><label for='data-331ef31d-53b8-4349-8794-aef35959bc4d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.8145693 , -0.68489222, -0.48518501, ..., -0.4515612 ,\n",
              "        -0.4005887 , -0.53480625],\n",
              "       [-0.36336872, -0.14181324, -0.74865918, ..., -0.42648482,\n",
              "        -0.50778888, -0.50372814],\n",
              "       [-0.31703342, -0.6517594 , -0.6517594 , ..., -0.65617658,\n",
              "        -0.31616026, -0.72058786],\n",
              "       [-0.43136423, -0.35512787, -0.46224556, ..., -0.19888927,\n",
              "        -0.46919501, -0.46919501]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.06269 -0.152 ... -0.1888 -0.1888</div><input id='attrs-e604911e-69da-42bd-b0a6-a6f586d3e54b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e604911e-69da-42bd-b0a6-a6f586d3e54b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9b54918b-6bec-4a6f-985e-3f87a1745a92' class='xr-var-data-in' type='checkbox'><label for='data-9b54918b-6bec-4a6f-985e-3f87a1745a92' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.06269475, -0.15197851, -0.15729474, ..., -0.3011382 ,\n",
              "         0.11434535, -0.29580854],\n",
              "       [-0.15082673,  0.06119222, -0.36142038, ..., -0.47242468,\n",
              "        -0.21935313, -0.06885318],\n",
              "       [-0.0886056 , -0.27813289, -0.27813289, ..., -0.37253077,\n",
              "         0.15640575, -0.32859346],\n",
              "       [-0.06351571, -0.31310975, -0.00170153, ..., -0.14374092,\n",
              "        -0.18880196, -0.18880196]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>mu</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.8674 -0.7762 ... -0.3536 -0.3241</div><input id='attrs-ec3ac322-8e76-4f0a-9346-94ae2563bb15' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ec3ac322-8e76-4f0a-9346-94ae2563bb15' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-89ce02bf-8912-4499-8ee3-ec1758e354ad' class='xr-var-data-in' type='checkbox'><label for='data-89ce02bf-8912-4499-8ee3-ec1758e354ad' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[-0.8674291 , -0.77617008, -0.73379982, ..., -0.81202184,\n",
              "         -0.77617008, -0.76639233],\n",
              "        [-0.8130298 , -0.59180858, -0.48909873, ..., -0.67871692,\n",
              "         -0.59180858, -0.56810631],\n",
              "        [-0.61780486, -0.38884529, -0.28254263, ..., -0.47879369,\n",
              "         -0.38884529, -0.3643139 ],\n",
              "        ...,\n",
              "        [-0.70545973, -0.26712038, -0.06360568, ..., -0.43932512,\n",
              "         -0.26712038, -0.22015545],\n",
              "        [-0.30418075, -0.47062283, -0.5478995 , ..., -0.40523487,\n",
              "         -0.47062283, -0.4884559 ],\n",
              "        [-0.7842112 , -0.35362974, -0.15371692, ..., -0.52278674,\n",
              "         -0.35362974, -0.30749601]],\n",
              "\n",
              "       [[-0.4905352 , -0.27099051, -0.16905905, ..., -0.35724021,\n",
              "         -0.27099051, -0.24746787],\n",
              "        [-0.09022026, -0.17929219, -0.22064701, ..., -0.14429965,\n",
              "         -0.17929219, -0.18883561],\n",
              "        [-1.05338341, -0.52729679, -0.28304229, ..., -0.73397367,\n",
              "         -0.52729679, -0.47093036],\n",
              "...\n",
              "        [-0.9702683 , -0.42800932, -0.17624621, ..., -0.64103963,\n",
              "         -0.42800932, -0.36991014],\n",
              "        [-0.18428993, -0.4119555 , -0.51765736, ..., -0.32251545,\n",
              "         -0.4119555 , -0.43634824],\n",
              "        [-0.99763473, -0.51933127, -0.2972618 , ..., -0.7072362 ,\n",
              "         -0.51933127, -0.46808447]],\n",
              "\n",
              "       [[-0.48491621, -0.39246219, -0.34953711, ..., -0.42878341,\n",
              "         -0.39246219, -0.3825564 ],\n",
              "        [-0.61911997, -0.16335473,  0.04825056, ..., -0.34240536,\n",
              "         -0.16335473, -0.11452274],\n",
              "        [-0.46368017, -0.46120341, -0.46005348, ..., -0.46217642,\n",
              "         -0.46120341, -0.46093804],\n",
              "        ...,\n",
              "        [-0.32008149, -0.11085098, -0.01370824, ..., -0.19304868,\n",
              "         -0.11085098, -0.08843342],\n",
              "        [-0.62837954, -0.35355778, -0.22596196, ..., -0.46152347,\n",
              "         -0.35355778, -0.32411259],\n",
              "        [-0.62837954, -0.35355778, -0.22596196, ..., -0.46152347,\n",
              "         -0.35355778, -0.32411259]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>pi</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2958 0.3151 ... 0.4125 0.4197</div><input id='attrs-e3479996-6eda-4ada-acc7-48c0df822764' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e3479996-6eda-4ada-acc7-48c0df822764' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ae64eeed-5a0c-45e9-bb41-ee01911af7a7' class='xr-var-data-in' type='checkbox'><label for='data-ae64eeed-5a0c-45e9-bb41-ee01911af7a7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[0.29578953, 0.31514591, 0.32436144, ..., 0.30745982,\n",
              "         0.31514591, 0.31726003],\n",
              "        [0.30724524, 0.35621999, 0.38010591, ..., 0.33654773,\n",
              "         0.35621999, 0.3616739 ],\n",
              "        [0.35028087, 0.40399531, 0.42983053, ..., 0.38253702,\n",
              "         0.40399531, 0.40991569],\n",
              "        ...,\n",
              "        [0.33060285, 0.43361417, 0.48410394, ..., 0.39190179,\n",
              "         0.43361417, 0.44518237],\n",
              "        [0.42453578, 0.38446884, 0.36635188, ..., 0.40005526,\n",
              "         0.38446884, 0.38025738],\n",
              "        [0.31341299, 0.4125025 , 0.46164626, ..., 0.37220083,\n",
              "         0.4125025 , 0.42372605]],\n",
              "\n",
              "       [[0.3797675 , 0.43266394, 0.45783561, ..., 0.4116278 ,\n",
              "         0.43266394, 0.43844684],\n",
              "        [0.47746022, 0.45529664, 0.44506096, ..., 0.46398756,\n",
              "         0.45529664, 0.45293088],\n",
              "        [0.25857592, 0.37114759, 0.42970808, ..., 0.32432334,\n",
              "         0.37114759, 0.38439606],\n",
              "...\n",
              "        [0.27482703, 0.39460179, 0.45605215, ..., 0.34501157,\n",
              "         0.39460179, 0.40856274],\n",
              "        [0.45405747, 0.39844332, 0.37340018, ..., 0.42006283,\n",
              "         0.39844332, 0.39261145],\n",
              "        [0.26940671, 0.37300862, 0.426227  , ..., 0.33020983,\n",
              "         0.37300862, 0.38506973]],\n",
              "\n",
              "       [[0.38109191, 0.40312472, 0.41349467, ..., 0.39441688,\n",
              "         0.40312472, 0.40551047],\n",
              "        [0.34998163, 0.45925189, 0.5120603 , ..., 0.41522531,\n",
              "         0.45925189, 0.47140057],\n",
              "        [0.38611315, 0.38670038, 0.38697314, ..., 0.38646964,\n",
              "         0.38670038, 0.38676332],\n",
              "        ...,\n",
              "        [0.42065589, 0.4723156 , 0.49657299, ..., 0.45188716,\n",
              "         0.4723156 , 0.47790604],\n",
              "        [0.34787806, 0.41251994, 0.44374865, ..., 0.38662448,\n",
              "         0.41251994, 0.41967381],\n",
              "        [0.34787806, 0.41251994, 0.44374865, ..., 0.38662448,\n",
              "         0.41251994, 0.41967381]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-72253d0e-3f15-41e6-a841-4021963cab3f' class='xr-section-summary-in' type='checkbox'  checked><label for='section-72253d0e-3f15-41e6-a841-4021963cab3f' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:18:14.229573</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>7.192113637924194</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_predictions4e3710cd-895f-4aa3-bff9-577f39f76c89\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_predictions4e3710cd-895f-4aa3-bff9-577f39f76c89\" class = \"xr-section-summary\">predictions</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:  (chain: 4, draw: 5000, obs_id: 1)\n",
              "Coordinates:\n",
              "  * chain    (chain) int64 0 1 2 3\n",
              "  * draw     (draw) int64 0 1 2 3 4 5 6 7 ... 4993 4994 4995 4996 4997 4998 4999\n",
              "  * obs_id   (obs_id) int64 174\n",
              "Data variables:\n",
              "    y_est    (chain, draw, obs_id) int64 1 0 0 1 0 0 1 0 0 ... 1 0 0 1 1 0 0 1 0\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:19:42.241456\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-e65fe771-9215-424f-a88b-09c35df1fe9a' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-e65fe771-9215-424f-a88b-09c35df1fe9a' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>obs_id</span>: 1</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-b1acc50a-e884-4b1e-94f1-ef28f59deda9' class='xr-section-summary-in' type='checkbox'  checked><label for='section-b1acc50a-e884-4b1e-94f1-ef28f59deda9' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-cbef01d8-af82-49d7-be24-9e8992586a84' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-cbef01d8-af82-49d7-be24-9e8992586a84' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-29e3a62d-2825-4579-9b5e-7237da0c338e' class='xr-var-data-in' type='checkbox'><label for='data-29e3a62d-2825-4579-9b5e-7237da0c338e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-2549dd59-abc6-4c51-a641-3fd70285ce9c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2549dd59-abc6-4c51-a641-3fd70285ce9c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-688b68c9-e14d-49e0-8693-2a61dedecfaf' class='xr-var-data-in' type='checkbox'><label for='data-688b68c9-e14d-49e0-8693-2a61dedecfaf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>174</div><input id='attrs-52bf79b1-9e66-4afe-ae11-947b579be6e8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-52bf79b1-9e66-4afe-ae11-947b579be6e8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-54ce3cb2-3a3d-4b58-b440-6b113518e5fc' class='xr-var-data-in' type='checkbox'><label for='data-54ce3cb2-3a3d-4b58-b440-6b113518e5fc' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([174])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-89a65bd2-12ba-4580-9b52-5d5af2d18d82' class='xr-section-summary-in' type='checkbox'  checked><label for='section-89a65bd2-12ba-4580-9b52-5d5af2d18d82' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>y_est</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 0 0 1 0 0 1 0 ... 0 0 1 1 0 0 1 0</div><input id='attrs-88297107-0d31-44a0-b63b-5787936590e1' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-88297107-0d31-44a0-b63b-5787936590e1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-03b217d9-8465-469b-849d-cb79beca1bf1' class='xr-var-data-in' type='checkbox'><label for='data-03b217d9-8465-469b-849d-cb79beca1bf1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[1],\n",
              "        [0],\n",
              "        [0],\n",
              "        ...,\n",
              "        [0],\n",
              "        [1],\n",
              "        [1]],\n",
              "\n",
              "       [[1],\n",
              "        [0],\n",
              "        [0],\n",
              "        ...,\n",
              "        [0],\n",
              "        [0],\n",
              "        [0]],\n",
              "\n",
              "       [[1],\n",
              "        [0],\n",
              "        [0],\n",
              "        ...,\n",
              "        [0],\n",
              "        [0],\n",
              "        [1]],\n",
              "\n",
              "       [[1],\n",
              "        [0],\n",
              "        [1],\n",
              "        ...,\n",
              "        [0],\n",
              "        [1],\n",
              "        [0]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-0abb12e9-7bc6-4bfb-b90c-bf434b8d7ca5' class='xr-section-summary-in' type='checkbox'  checked><label for='section-0abb12e9-7bc6-4bfb-b90c-bf434b8d7ca5' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:19:42.241456</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_sample_statsd51c1c68-3b23-48b4-a0e6-0dc559664c7b\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_sample_statsd51c1c68-3b23-48b4-a0e6-0dc559664c7b\" class = \"xr-section-summary\">sample_stats</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:                (chain: 4, draw: 5000)\n",
              "Coordinates:\n",
              "  * chain                  (chain) int64 0 1 2 3\n",
              "  * draw                   (draw) int64 0 1 2 3 4 5 ... 4995 4996 4997 4998 4999\n",
              "Data variables: (12/17)\n",
              "    max_energy_error       (chain, draw) float64 0.9762 -0.5669 ... 0.4145\n",
              "    tree_depth             (chain, draw) int64 2 1 2 2 2 2 2 1 ... 1 2 2 2 2 2 2\n",
              "    lp                     (chain, draw) float64 -118.2 -116.4 ... -115.4 -115.4\n",
              "    smallest_eigval        (chain, draw) float64 nan nan nan nan ... nan nan nan\n",
              "    energy                 (chain, draw) float64 118.4 117.7 ... 116.6 116.2\n",
              "    index_in_trajectory    (chain, draw) int64 -1 -1 -1 -1 2 2 ... 1 2 -1 3 -1 0\n",
              "    ...                     ...\n",
              "    acceptance_rate        (chain, draw) float64 0.4835 1.0 1.0 ... 1.0 0.7393\n",
              "    step_size              (chain, draw) float64 1.181 1.181 ... 1.039 1.039\n",
              "    largest_eigval         (chain, draw) float64 nan nan nan nan ... nan nan nan\n",
              "    perf_counter_start     (chain, draw) float64 3.032e+06 ... 3.032e+06\n",
              "    perf_counter_diff      (chain, draw) float64 0.0009529 ... 0.0005973\n",
              "    reached_max_treedepth  (chain, draw) bool False False False ... False False\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:18:14.285150\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0\n",
              "    sampling_time:              7.192113637924194\n",
              "    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-b12d6e55-e692-458c-ab81-ce6ca93ba8c2' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-b12d6e55-e692-458c-ab81-ce6ca93ba8c2' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-50c996e1-2a21-4d09-a33d-a79d4f756883' class='xr-section-summary-in' type='checkbox'  checked><label for='section-50c996e1-2a21-4d09-a33d-a79d4f756883' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-bca0f816-6dfb-4e43-b74f-bc188316e599' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bca0f816-6dfb-4e43-b74f-bc188316e599' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9690d803-31f5-4bb5-a379-a5776dd24b26' class='xr-var-data-in' type='checkbox'><label for='data-9690d803-31f5-4bb5-a379-a5776dd24b26' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-4df5737f-5861-42ff-bbc2-9e3f179af525' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4df5737f-5861-42ff-bbc2-9e3f179af525' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-be5f5975-85c7-43f3-a431-1c8d00e1e6c8' class='xr-var-data-in' type='checkbox'><label for='data-be5f5975-85c7-43f3-a431-1c8d00e1e6c8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-7ab4132f-2483-48a0-9183-fca22b3779f7' class='xr-section-summary-in' type='checkbox'  ><label for='section-7ab4132f-2483-48a0-9183-fca22b3779f7' class='xr-section-summary' >Data variables: <span>(17)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>max_energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.9762 -0.5669 ... -0.5822 0.4145</div><input id='attrs-eaf660e4-c776-4460-8460-75b513f98076' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-eaf660e4-c776-4460-8460-75b513f98076' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-91e02af1-02dd-4866-ac7c-7f7ff2ef3889' class='xr-var-data-in' type='checkbox'><label for='data-91e02af1-02dd-4866-ac7c-7f7ff2ef3889' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.9761532 , -0.56687459, -0.31912494, ...,  0.41282585,\n",
              "         0.40402376,  0.39518582],\n",
              "       [-0.1406788 ,  1.33737233, -1.20508901, ...,  0.85927513,\n",
              "        -0.940784  ,  0.06722142],\n",
              "       [ 0.35421832, -0.17705815,  0.20226248, ..., -0.46595582,\n",
              "        -0.52617444, -0.3493382 ],\n",
              "       [ 0.07588791,  0.31262774, -0.15610962, ...,  1.50445159,\n",
              "        -0.58215104,  0.41452272]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tree_depth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>2 1 2 2 2 2 2 1 ... 1 1 2 2 2 2 2 2</div><input id='attrs-a70e0028-0063-48d2-b742-62d4f1dae79d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a70e0028-0063-48d2-b742-62d4f1dae79d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-58edd44c-13b8-4837-990f-4d6eeedaa318' class='xr-var-data-in' type='checkbox'><label for='data-58edd44c-13b8-4837-990f-4d6eeedaa318' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[2, 1, 2, ..., 2, 2, 2],\n",
              "       [2, 2, 2, ..., 2, 1, 2],\n",
              "       [2, 2, 1, ..., 2, 2, 2],\n",
              "       [2, 2, 2, ..., 2, 2, 2]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lp</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-118.2 -116.4 ... -115.4 -115.4</div><input id='attrs-c70b1deb-60c9-4d32-935c-607d2f4ecc95' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c70b1deb-60c9-4d32-935c-607d2f4ecc95' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-080dd0ec-e0f6-40ea-9d0f-a39ebd4f1974' class='xr-var-data-in' type='checkbox'><label for='data-080dd0ec-e0f6-40ea-9d0f-a39ebd4f1974' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-118.15253665, -116.35425205, -115.36722987, ..., -115.82195283,\n",
              "        -117.13966251, -115.83654956],\n",
              "       [-115.6396089 , -118.93663923, -117.7472907 , ..., -117.55214597,\n",
              "        -115.46681503, -115.5656266 ],\n",
              "       [-116.01784464, -116.3266338 , -116.3266338 , ..., -116.97488518,\n",
              "        -118.13756599, -117.21682271],\n",
              "       [-115.60028125, -116.23580285, -115.91173239, ..., -117.08895024,\n",
              "        -115.38471763, -115.38471763]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smallest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-6c4c0c91-2bf6-48cf-81e5-26560e093f36' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6c4c0c91-2bf6-48cf-81e5-26560e093f36' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-51c42fb9-8dfa-4127-818d-3344cf1c4e49' class='xr-var-data-in' type='checkbox'><label for='data-51c42fb9-8dfa-4127-818d-3344cf1c4e49' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>118.4 117.7 116.1 ... 116.6 116.2</div><input id='attrs-32ef8c3c-4eba-4975-8900-60680015434b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-32ef8c3c-4eba-4975-8900-60680015434b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-85c90eae-604d-427d-b618-b2ce1a3a6390' class='xr-var-data-in' type='checkbox'><label for='data-85c90eae-604d-427d-b618-b2ce1a3a6390' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[118.43726662, 117.71626146, 116.10952833, ..., 116.74580903,\n",
              "        117.63696013, 117.66621547],\n",
              "       [116.09148738, 118.94618844, 118.68273435, ..., 117.84033694,\n",
              "        116.63795902, 115.67682795],\n",
              "       [116.52041727, 116.35076992, 117.02570708, ..., 118.87399922,\n",
              "        118.18925259, 118.97599494],\n",
              "       [115.89899915, 116.45796757, 116.66125457, ..., 120.25079346,\n",
              "        116.6300189 , 116.20951054]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>index_in_trajectory</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>-1 -1 -1 -1 2 2 ... 1 2 -1 3 -1 0</div><input id='attrs-0e07664b-3e5c-4e5d-8831-f549302d0924' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0e07664b-3e5c-4e5d-8831-f549302d0924' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5f5984dd-25df-4359-9f93-44861bdcdc47' class='xr-var-data-in' type='checkbox'><label for='data-5f5984dd-25df-4359-9f93-44861bdcdc47' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-1, -1, -1, ...,  2, -2,  1],\n",
              "       [ 2,  1, -2, ..., -1, -1, -3],\n",
              "       [-2, -3,  0, ...,  2, -3, -2],\n",
              "       [-3,  1, -2, ...,  3, -1,  0]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>n_steps</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.0 1.0 3.0 3.0 ... 3.0 3.0 3.0 3.0</div><input id='attrs-d0b3504f-b7e0-4856-9cd8-02f61679b793' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d0b3504f-b7e0-4856-9cd8-02f61679b793' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e0493e5d-97b1-4df7-bdc8-166467616d35' class='xr-var-data-in' type='checkbox'><label for='data-e0493e5d-97b1-4df7-bdc8-166467616d35' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[3., 1., 3., ..., 3., 3., 3.],\n",
              "       [3., 3., 3., ..., 3., 1., 3.],\n",
              "       [3., 3., 1., ..., 3., 3., 3.],\n",
              "       [3., 3., 3., ..., 3., 3., 3.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>diverging</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-e186e781-c234-4664-a90c-ad292e57eb81' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e186e781-c234-4664-a90c-ad292e57eb81' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0f88a8b3-2020-4257-854d-ad314c77a467' class='xr-var-data-in' type='checkbox'><label for='data-0f88a8b3-2020-4257-854d-ad314c77a467' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>process_time_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0009531 0.0005062 ... 0.0005974</div><input id='attrs-e58f1e54-cb28-4d76-a213-d5335c15a387' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e58f1e54-cb28-4d76-a213-d5335c15a387' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-cce3366d-5653-40ae-9f3e-b51c10b57400' class='xr-var-data-in' type='checkbox'><label for='data-cce3366d-5653-40ae-9f3e-b51c10b57400' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00095313, 0.00050618, 0.00124538, ..., 0.0006048 , 0.00061033,\n",
              "        0.00056202],\n",
              "       [0.00099295, 0.00099939, 0.00101067, ..., 0.00061081, 0.00031945,\n",
              "        0.00058481],\n",
              "       [0.00061531, 0.00058284, 0.00031622, ..., 0.00060114, 0.00060868,\n",
              "        0.0006058 ],\n",
              "       [0.00059268, 0.00065066, 0.0006156 , ..., 0.00059002, 0.00062388,\n",
              "        0.00059741]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.919 -0.5669 ... -0.5822 0.0</div><input id='attrs-c38b84e0-440c-4580-8254-1cc8b8f8a3de' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c38b84e0-440c-4580-8254-1cc8b8f8a3de' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-25aa707a-e923-48b1-a53f-f876c65eee20' class='xr-var-data-in' type='checkbox'><label for='data-25aa707a-e923-48b1-a53f-f876c65eee20' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.91895573, -0.56687459, -0.31912494, ...,  0.06210555,\n",
              "         0.40402376, -0.37947623],\n",
              "       [-0.1406788 ,  1.33737233, -0.42650396, ...,  0.80203627,\n",
              "        -0.940784  ,  0.04809164],\n",
              "       [ 0.18704023,  0.09744997,  0.        , ..., -0.37416599,\n",
              "         0.44126571, -0.3493382 ],\n",
              "       [ 0.00229261,  0.25216459, -0.11560866, ...,  0.21692852,\n",
              "        -0.58215104,  0.        ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size_bar</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.243 1.243 1.243 ... 1.16 1.16</div><input id='attrs-fccbaaa0-6bb1-4672-83eb-a8621cecba87' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-fccbaaa0-6bb1-4672-83eb-a8621cecba87' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-55e22292-4210-4205-a95d-bb75165fa63d' class='xr-var-data-in' type='checkbox'><label for='data-55e22292-4210-4205-a95d-bb75165fa63d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.24341251, 1.24341251, 1.24341251, ..., 1.24341251, 1.24341251,\n",
              "        1.24341251],\n",
              "       [1.14507487, 1.14507487, 1.14507487, ..., 1.14507487, 1.14507487,\n",
              "        1.14507487],\n",
              "       [1.12152271, 1.12152271, 1.12152271, ..., 1.12152271, 1.12152271,\n",
              "        1.12152271],\n",
              "       [1.15967085, 1.15967085, 1.15967085, ..., 1.15967085, 1.15967085,\n",
              "        1.15967085]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>acceptance_rate</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.4835 1.0 1.0 ... 1.0 0.7393</div><input id='attrs-be036a84-b26f-4348-b6c9-5671e1234a93' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-be036a84-b26f-4348-b6c9-5671e1234a93' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e8279938-4de1-4f2f-beb5-861f6e440e03' class='xr-var-data-in' type='checkbox'><label for='data-e8279938-4de1-4f2f-beb5-861f6e440e03' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.48345839, 1.        , 1.        , ..., 0.78874586, 0.80747745,\n",
              "        0.89118496],\n",
              "       [0.99007365, 0.56151608, 1.        , ..., 0.62396129, 1.        ,\n",
              "        0.95680671],\n",
              "       [0.8206355 , 0.96192531, 0.81688048, ..., 0.99236423, 0.82688818,\n",
              "        0.92656315],\n",
              "       [0.95374675, 0.79650186, 0.99204497, ..., 0.47662515, 1.        ,\n",
              "        0.73933241]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.181 1.181 1.181 ... 1.039 1.039</div><input id='attrs-8a32d2fa-a169-4198-9e28-ad358e2e80d6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8a32d2fa-a169-4198-9e28-ad358e2e80d6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-07d7e0eb-1bc9-46a4-88a2-68c1e77c5a38' class='xr-var-data-in' type='checkbox'><label for='data-07d7e0eb-1bc9-46a4-88a2-68c1e77c5a38' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.18119476, 1.18119476, 1.18119476, ..., 1.18119476, 1.18119476,\n",
              "        1.18119476],\n",
              "       [0.95657423, 0.95657423, 0.95657423, ..., 0.95657423, 0.95657423,\n",
              "        0.95657423],\n",
              "       [1.1997429 , 1.1997429 , 1.1997429 , ..., 1.1997429 , 1.1997429 ,\n",
              "        1.1997429 ],\n",
              "       [1.03905335, 1.03905335, 1.03905335, ..., 1.03905335, 1.03905335,\n",
              "        1.03905335]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>largest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-4d3fd1fc-26fb-4fb8-b227-3bc040416046' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4d3fd1fc-26fb-4fb8-b227-3bc040416046' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-57aaa3f8-fdee-431d-889d-86c486ac20ad' class='xr-var-data-in' type='checkbox'><label for='data-57aaa3f8-fdee-431d-889d-86c486ac20ad' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_start</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.032e+06 3.032e+06 ... 3.032e+06</div><input id='attrs-bc759c61-fa80-4fec-9f2b-322eba0021ba' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bc759c61-fa80-4fec-9f2b-322eba0021ba' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e8a9214c-69ce-47ca-9495-9b59039185b8' class='xr-var-data-in' type='checkbox'><label for='data-e8a9214c-69ce-47ca-9495-9b59039185b8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[3032075.7719216 , 3032075.77316131, 3032075.77391473, ...,\n",
              "        3032081.17875428, 3032081.17952525, 3032081.18028967],\n",
              "       [3032075.72682757, 3032075.72808085, 3032075.72931051, ...,\n",
              "        3032080.81581945, 3032080.81659805, 3032080.81709057],\n",
              "       [3032075.66460019, 3032075.66539325, 3032075.66615679, ...,\n",
              "        3032081.26598944, 3032081.26675685, 3032081.26753005],\n",
              "       [3032075.77415694, 3032075.77492657, 3032075.77573816, ...,\n",
              "        3032081.64506416, 3032081.64582459, 3032081.64662164]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0009529 0.0005056 ... 0.0005973</div><input id='attrs-ace26db9-0458-46ec-858a-274643c9e777' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ace26db9-0458-46ec-858a-274643c9e777' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-56b99109-0e3d-4940-8381-5b1d7d714ab8' class='xr-var-data-in' type='checkbox'><label for='data-56b99109-0e3d-4940-8381-5b1d7d714ab8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00095289, 0.00050557, 0.02726595, ..., 0.00060449, 0.00061051,\n",
              "        0.00056179],\n",
              "       [0.00099271, 0.00099928, 0.00101005, ..., 0.00061041, 0.00031918,\n",
              "        0.00058437],\n",
              "       [0.00061511, 0.00058242, 0.00031561, ..., 0.00060067, 0.00060826,\n",
              "        0.00060569],\n",
              "       [0.00059227, 0.00064994, 0.00061541, ..., 0.00058961, 0.00062344,\n",
              "        0.00059732]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>reached_max_treedepth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-99f8daab-e241-48d0-8826-1ecacedf5ec3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-99f8daab-e241-48d0-8826-1ecacedf5ec3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ede902c7-b8f3-45cc-b672-9d7fd0ded8fe' class='xr-var-data-in' type='checkbox'><label for='data-ede902c7-b8f3-45cc-b672-9d7fd0ded8fe' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-a1b11fef-7ac7-4ee8-9458-fbdd62608be7' class='xr-section-summary-in' type='checkbox'  checked><label for='section-a1b11fef-7ac7-4ee8-9458-fbdd62608be7' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:18:14.285150</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>7.192113637924194</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_observed_datac46152d7-12ab-4613-96f6-5ad214f396fa\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_observed_datac46152d7-12ab-4613-96f6-5ad214f396fa\" class = \"xr-section-summary\">observed_data</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:  (obs_id: 174)\n",
              "Coordinates:\n",
              "  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 166 167 168 169 170 171 172 173\n",
              "Data variables:\n",
              "    y_est    (obs_id) int64 0 0 0 0 1 1 0 1 0 1 1 1 ... 1 1 1 0 0 0 0 0 0 0 0 1\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:18:14.299177\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-a7dfee99-57cb-4720-89a9-ea85c761f360' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-a7dfee99-57cb-4720-89a9-ea85c761f360' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-74ab20f7-75b5-44ea-be9f-2bf61af27df6' class='xr-section-summary-in' type='checkbox'  checked><label for='section-74ab20f7-75b5-44ea-be9f-2bf61af27df6' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-dc4d810d-cf52-4e80-b80e-866d11b14403' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-dc4d810d-cf52-4e80-b80e-866d11b14403' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-36df3fb8-ddcb-4f8c-bfc3-ba581b5e91fc' class='xr-var-data-in' type='checkbox'><label for='data-36df3fb8-ddcb-4f8c-bfc3-ba581b5e91fc' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-bd760f6e-7640-42cd-a058-36d00394cad0' class='xr-section-summary-in' type='checkbox'  checked><label for='section-bd760f6e-7640-42cd-a058-36d00394cad0' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>y_est</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 0 0 0 1 1 0 1 ... 0 0 0 0 0 0 0 1</div><input id='attrs-d15d79f5-4c24-4da1-a4df-31fcca50b711' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d15d79f5-4c24-4da1-a4df-31fcca50b711' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c2e19759-1f70-4366-8041-d11a9f1cb932' class='xr-var-data-in' type='checkbox'><label for='data-c2e19759-1f70-4366-8041-d11a9f1cb932' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,\n",
              "       1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1,\n",
              "       0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0,\n",
              "       1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1,\n",
              "       0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,\n",
              "       0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-3d6f9d21-1472-407b-98d5-46e96226926e' class='xr-section-summary-in' type='checkbox'  checked><label for='section-3d6f9d21-1472-407b-98d5-46e96226926e' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:18:14.299177</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_constant_data7fefe8ed-a1ee-40e9-874f-c4833e19b79f\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_constant_data7fefe8ed-a1ee-40e9-874f-c4833e19b79f\" class = \"xr-section-summary\">constant_data</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:    (obs_id: 174)\n",
              "Coordinates:\n",
              "  * obs_id     (obs_id) int64 0 1 2 3 4 5 6 7 ... 167 168 169 170 171 172 173\n",
              "Data variables:\n",
              "    avoidance  (obs_id) float64 0.8431 -0.6125 -1.288 ... -0.6125 -0.7684\n",
              "    y          (obs_id) int32 0 0 0 0 1 1 0 1 0 1 1 1 ... 1 1 0 0 0 0 0 0 0 0 1\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:18:14.303960\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-ae6191e0-7b32-4439-809a-035511bba50f' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-ae6191e0-7b32-4439-809a-035511bba50f' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-2e78b69c-3aa4-4488-87b2-dbf2db431efc' class='xr-section-summary-in' type='checkbox'  checked><label for='section-2e78b69c-3aa4-4488-87b2-dbf2db431efc' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-2612f18c-d32d-480f-9a6e-8014625627ef' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2612f18c-d32d-480f-9a6e-8014625627ef' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8690ba37-fc9a-4c09-aec6-03c7987ba0b5' class='xr-var-data-in' type='checkbox'><label for='data-8690ba37-fc9a-4c09-aec6-03c7987ba0b5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-0ab85315-c94c-4016-b00b-3a3653aa9376' class='xr-section-summary-in' type='checkbox'  checked><label for='section-0ab85315-c94c-4016-b00b-3a3653aa9376' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>avoidance</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.8431 -0.6125 ... -0.6125 -0.7684</div><input id='attrs-94a8f935-c937-4a41-b73e-5cbcef93ec36' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-94a8f935-c937-4a41-b73e-5cbcef93ec36' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0ce6ee99-965c-4987-b0eb-e711ef5ca313' class='xr-var-data-in' type='checkbox'><label for='data-0ce6ee99-965c-4987-b0eb-e711ef5ca313' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0.84312961, -0.61247899, -1.28829727,  0.47922746, -0.61247899,\n",
              "        1.46696187, -1.02836716, -0.76843705, -0.97638114, -0.30056286,\n",
              "        0.79114359,  0.79114359, -1.02836716, -0.04063275, -0.04063275,\n",
              "        0.84312961, -1.08035318, -1.13233921,  0.63518553,  0.37525542,\n",
              "        0.68717155, -0.04063275, -2.01610157, -1.96411555, -0.30056286,\n",
              "       -1.34028329,  1.93483607, -0.24857684,  0.73915757, -0.24857684,\n",
              "        0.79114359, -0.24857684, -0.35254888, -0.56049297,  2.87058445,\n",
              "       -0.30056286, -1.18432523,  0.47922746,  0.84312961, -1.54822738,\n",
              "        0.16731133,  1.10305972, -0.50850695,  0.06333929,  0.79114359,\n",
              "        1.36298983,  0.06333929, -0.35254888,  0.63518553,  0.11532531,\n",
              "       -1.65219942, -0.82042308, -0.82042308, -0.19659082, -0.30056286,\n",
              "        1.25901779,  1.0510737 , -0.56049297, -0.97638114, -1.91212953,\n",
              "        0.58319951,  0.21929736,  0.16731133,  0.42724144, -0.8724091 ,\n",
              "        0.84312961,  0.58319951,  0.53121348,  0.27128338,  0.79114359,\n",
              "        0.47922746, -1.34028329,  0.3232694 , -0.4045349 ,  1.88285005,\n",
              "       -0.92439512, -0.97638114, -0.76843705,  1.46696187, -0.35254888,\n",
              "       -0.82042308, -1.39226931,  0.84312961,  0.53121348, -0.66446501,\n",
              "        0.53121348,  0.84312961,  0.06333929, -0.8724091 , -1.49624136,\n",
              "       -0.8724091 , -0.4045349 ,  2.29873822, -0.35254888, -1.39226931,\n",
              "       -0.82042308,  0.79114359,  0.94710166,  0.79114359,  0.79114359,\n",
              "        2.09079413, -1.34028329, -1.70418544,  0.79114359, -0.1446048 ,\n",
              "       -0.19659082,  0.58319951,  1.10305972,  0.84312961,  0.27128338,\n",
              "       -1.13233921, -0.61247899,  0.16731133, -0.19659082, -0.30056286,\n",
              "        0.27128338,  0.11532531,  0.11532531,  0.79114359, -0.92439512,\n",
              "       -1.80815749,  0.37525542, -0.04063275,  1.15504574, -1.28829727,\n",
              "       -1.28829727, -1.08035318, -1.44425533, -0.30056286, -1.23631125,\n",
              "        0.94710166,  0.68717155,  0.01135327, -0.04063275,  0.79114359,\n",
              "       -0.04063275,  1.0510737 , -0.71645103,  0.3232694 ,  0.06333929,\n",
              "        0.79114359, -1.70418544, -0.1446048 ,  1.98682209,  0.79114359,\n",
              "        2.09079413, -1.91212953, -1.44425533,  0.63518553, -0.92439512,\n",
              "        0.68717155, -0.50850695, -1.28829727,  3.07852854, -0.09261877,\n",
              "        1.778878  , -0.35254888, -0.92439512,  0.53121348, -0.92439512,\n",
              "       -0.56049297, -0.4045349 ,  0.68717155,  2.29873822,  0.53121348,\n",
              "        1.0510737 ,  0.58319951,  1.31100381,  0.21929736,  0.16731133,\n",
              "        0.58319951, -0.04063275, -0.61247899, -0.76843705])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>y</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>0 0 0 0 1 1 0 1 ... 0 0 0 0 0 0 0 1</div><input id='attrs-72ea7da2-d117-4fb7-b9cc-cdc33edb2c9e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-72ea7da2-d117-4fb7-b9cc-cdc33edb2c9e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6b7fc955-8321-4466-bb59-1fb3b440333c' class='xr-var-data-in' type='checkbox'><label for='data-6b7fc955-8321-4466-bb59-1fb3b440333c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,\n",
              "       1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1,\n",
              "       0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0,\n",
              "       1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1,\n",
              "       0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,\n",
              "       0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1],\n",
              "      dtype=int32)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-1e6bccfb-bf1b-41ca-9eb7-0d79e5ee2636' class='xr-section-summary-in' type='checkbox'  checked><label for='section-1e6bccfb-bf1b-41ca-9eb7-0d79e5ee2636' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:18:14.303960</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_predictions_constant_data9376363c-972f-4fc0-9636-ac379f35ab24\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_predictions_constant_data9376363c-972f-4fc0-9636-ac379f35ab24\" class = \"xr-section-summary\">predictions_constant_data</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:    (obs_id: 1)\n",
              "Coordinates:\n",
              "  * obs_id     (obs_id) int64 174\n",
              "Data variables:\n",
              "    avoidance  (obs_id) float64 1.0\n",
              "    y          (obs_id) int32 0\n",
              "Attributes:\n",
              "    created_at:                 2023-12-05T10:19:42.257899\n",
              "    arviz_version:              0.16.0\n",
              "    inference_library:          pymc\n",
              "    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-d4f7dda1-bcbe-421e-8b66-846d95485d77' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-d4f7dda1-bcbe-421e-8b66-846d95485d77' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 1</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-b24a35ee-ecdf-4ebc-823b-073f312ebdc3' class='xr-section-summary-in' type='checkbox'  checked><label for='section-b24a35ee-ecdf-4ebc-823b-073f312ebdc3' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>174</div><input id='attrs-51c091a8-fdd4-4727-b9b8-a0a4d30ede86' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-51c091a8-fdd4-4727-b9b8-a0a4d30ede86' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-43c6e186-22d5-463c-bc50-50bb3aeb832e' class='xr-var-data-in' type='checkbox'><label for='data-43c6e186-22d5-463c-bc50-50bb3aeb832e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([174])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-75c2eaf2-ca1c-49a6-acbd-509b0f016a7e' class='xr-section-summary-in' type='checkbox'  checked><label for='section-75c2eaf2-ca1c-49a6-acbd-509b0f016a7e' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>avoidance</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.0</div><input id='attrs-bbe6ed4a-84e4-4aa8-b6dd-ae0aa208e8c4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bbe6ed4a-84e4-4aa8-b6dd-ae0aa208e8c4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c721e9d1-41eb-4400-bb5e-2b3ad30363d3' class='xr-var-data-in' type='checkbox'><label for='data-c721e9d1-41eb-4400-bb5e-2b3ad30363d3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>y</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>0</div><input id='attrs-c95250df-f5cd-435e-aaba-bdfbc2ec920f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c95250df-f5cd-435e-aaba-bdfbc2ec920f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-df775e5d-2cfe-4b76-83ee-dd73a4b0b76d' class='xr-var-data-in' type='checkbox'><label for='data-df775e5d-2cfe-4b76-83ee-dd73a4b0b76d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0], dtype=int32)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-34a71ae7-0613-460c-9509-f082f6b3952d' class='xr-section-summary-in' type='checkbox'  checked><label for='section-34a71ae7-0613-460c-9509-f082f6b3952d' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:19:42.257899</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "              </ul>\n",
              "            </div>\n",
              "            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-sections.group-sections {\n",
              "  grid-template-columns: auto;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt, dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              ".xr-wrap{width:700px!important;} </style>"
            ],
            "text/plain": [
              "Inference data with groups:\n",
              "\t> posterior\n",
              "\t> predictions\n",
              "\t> sample_stats\n",
              "\t> observed_data\n",
              "\t> constant_data\n",
              "\t> predictions_constant_data"
            ]
          },
          "execution_count": 25,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "prediction"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 26,
      "metadata": {
        "collapsed": false,
        "id": "2CE98E060B80451B9C76365BD0800EE8",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<img src=\"https://cdn.kesci.com/upload/rt/2CE98E060B80451B9C76365BD0800EE8/s56vcv225s.png\">"
            ],
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "# 提取储存在 predicitons中的预测值\n",
        "y_pred = prediction.predictions[\"y_est\"].stack(sample=(\"chain\",\"draw\",\"obs_id\")).values\n",
        "# 统计其中0和1的个数，并除以总数，得到0和1对应的比例值\n",
        "y_pred_freq = np.bincount(y_pred)/len(y_pred)\n",
        "#绘制柱状图\n",
        "bars = plt.bar([0, 1], y_pred_freq, color=\"#70AD47\")\n",
        "#用于在柱状图上标明比例值\n",
        "for bar, freq in zip(bars, y_pred_freq):\n",
        "    plt.text(bar.get_x() + bar.get_width() / 2, bar.get_height(), f\"{freq:.2f}\", ha='center', va='bottom')\n",
        "#对刻度、标题、坐标轴标题进行设置\n",
        "plt.xticks([0, 1])\n",
        "plt.suptitle(\"Out-of-sample prediction(X=1)\")\n",
        "plt.xlabel(\"romantic\")\n",
        "plt.ylabel(\"proportion\")\n",
        "sns.despine()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "B63BF6B9E4E14089893F097AACD30988",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### 分类标准(classification cut-off)  \n",
        "\n",
        "* 我们看到在对新结果的预测中，有66%的可能将其预测为0，有34%的可能将其预测为1  \n",
        "\n",
        "    * 🤔那么我们应该如何确定预测值是 0 还是 1  \n",
        "\n",
        "* 在得到预测值后，我们需要确定一个分类标准$c$，比如50-50 cut-off  \n",
        "\n",
        "    * 如果超过50%的结果显示$Y=1$，我们就将$Y$归类为1(恋爱)  \n",
        "    \n",
        "    * 否则将$Y$归类为0  \n",
        "\n",
        "* 总结：  \n",
        "    \n",
        "    * 假设$Y$是一个二分变量，1或0，从长度为N的马尔科夫链上，我们得出了$Y$的$N$个后验预测值，$\\left(Y_{new}^{(1)}, Y_{new}^{(2)}, \\ldots, Y_{new}^{(N)}\\right)$，$p$ 代表在这些预测值中$Y_{new}^{(i)} = 1$的比例  \n",
        "    \n",
        "    * 研究者可以选择分类标准$c \\in [0,1]$，将$p$ 与分类标准进行比较，并作出决策：  \n",
        "\n",
        "    * 若$p \\ge c$，则将$Y$归类为1  \n",
        "\n",
        "    * $p < c$，则将$Y$归类为0  \n",
        "\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ECC3A745F40341759F391A74589C9492",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "## 后验预测评估  \n",
        "\n",
        "* 除了对新数据做出预测，我们也需要对原数据的分类结果进行评估  \n",
        "\n",
        "* 这里我们需要重新运行模型定义和MCMC采样部分，因为在进行新数据预测时，我们对模型中的数据进行了修改。"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 27,
      "metadata": {
        "collapsed": false,
        "id": "B446FE2925504A81AC3D314518AF8198",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Auto-assigning NUTS sampler...\n",
            "Initializing NUTS using jitter+adapt_diag...\n",
            "Multiprocess sampling (4 chains in 4 jobs)\n",
            "NUTS: [beta_0, beta_1]\n"
          ]
        },
        {
          "data": {
            "text/html": [
              "\n",
              "<style>\n",
              "    /* Turns off some styling */\n",
              "    progress {\n",
              "        /* gets rid of default border in Firefox and Opera. */\n",
              "        border: none;\n",
              "        /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
              "        background-size: auto;\n",
              "    }\n",
              "    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
              "        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
              "    }\n",
              "    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
              "        background: #F44336;\n",
              "    }\n",
              "</style>\n"
            ],
            "text/plain": [
              "<IPython.core.display.HTML object>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 8 seconds.\n",
            "Sampling: [y_est]\n"
          ]
        },
        {
          "data": {
            "text/html": [
              "\n",
              "<style>\n",
              "    /* Turns off some styling */\n",
              "    progress {\n",
              "        /* gets rid of default border in Firefox and Opera. */\n",
              "        border: none;\n",
              "        /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
              "        background-size: auto;\n",
              "    }\n",
              "    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
              "        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
              "    }\n",
              "    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
              "        background: #F44336;\n",
              "    }\n",
              "</style>\n"
            ],
            "text/plain": [
              "<IPython.core.display.HTML object>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "coords = {\"obs_id\": df.index}\n",
        "\n",
        "with pm.Model(coords=coords) as log_model1:\n",
        "    avoidance = pm.MutableData(\"avoidance\", df.avoidance_r, dims=\"obs_id\")\n",
        "\n",
        "    #先验\n",
        "    beta_0 = pm.Normal(\"beta_0\", mu=0, sigma=0.5)          #定义beta_0          \n",
        "    beta_1 = pm.Normal(\"beta_1\", mu=0, sigma=0.5)           #定义beta_1\n",
        "    #线性关系\n",
        "    mu = pm.Deterministic(\"mu\", beta_0 + beta_1 * avoidance, dims=\"obs_id\")\n",
        "    pi = pm.Deterministic(\"pi\", pm.math.invlogit(mu), dims=\"obs_id\")\n",
        "    #似然\n",
        "    likelihood = pm.Bernoulli(\"y_est\",p=pi, observed=df.romantic,dims=\"obs_id\")\n",
        "\n",
        "    log_model1_trace = pm.sample(draws=5000,                 \n",
        "                                tune=1000,                  \n",
        "                                chains=4,                     \n",
        "                                discard_tuned_samples= True, \n",
        "                                random_seed=84735)\n",
        "    log_model1_ppc = pm.sample_posterior_predictive(log_model1_trace)\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 28,
      "metadata": {
        "collapsed": false,
        "id": "61F7F5F6A64243D8A4F94CA51B104E1B",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "<Axes: xlabel='y_est / y_est'>"
            ]
          },
          "execution_count": 28,
          "metadata": {},
          "output_type": "execute_result"
        },
        {
          "data": {
            "text/html": [
              "<img src=\"https://cdn.kesci.com/upload/rt/61F7F5F6A64243D8A4F94CA51B104E1B/s56vdrgz7g.png\">"
            ],
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "az.plot_ppc(log_model1_ppc, num_pp_samples=50)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "31483441897043DABC079732AF01451C",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### 组合真实数据与预测数据  \n",
        "\n",
        "* 我们可以将后验预测得到的分类结果(储存在`posterior_predictive.y_est`中)全部提出  \n",
        "\n",
        "* 并且对于每一个自变量，计算其后验分类结果的均值，相当于后验分类结果为 1 的比例  \n",
        "\n",
        "* 结合分类标准，生成新的预测结果"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 29,
      "metadata": {
        "collapsed": false,
        "id": "0DC30FEB3A724CF4AE2BBF24C929CEE0",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.DataArray &#x27;y_est&#x27; (obs_id: 174, sample: 20000)&gt;\n",
              "array([[0, 1, 1, ..., 1, 1, 0],\n",
              "       [0, 0, 1, ..., 1, 0, 0],\n",
              "       [0, 0, 0, ..., 1, 1, 1],\n",
              "       ...,\n",
              "       [0, 1, 0, ..., 0, 0, 1],\n",
              "       [0, 1, 1, ..., 0, 1, 1],\n",
              "       [1, 0, 0, ..., 1, 0, 0]])\n",
              "Coordinates:\n",
              "  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 166 167 168 169 170 171 172 173\n",
              "  * sample   (sample) object MultiIndex\n",
              "  * chain    (sample) int64 0 0 0 0 0 0 0 0 0 0 0 0 ... 3 3 3 3 3 3 3 3 3 3 3 3\n",
              "  * draw     (sample) int64 0 1 2 3 4 5 6 ... 4993 4994 4995 4996 4997 4998 4999</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'y_est'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 174</li><li><span class='xr-has-index'>sample</span>: 20000</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-699b634b-fb23-4c5f-9086-02a4237def2a' class='xr-array-in' type='checkbox' checked><label for='section-699b634b-fb23-4c5f-9086-02a4237def2a' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 ... 0 0 0 0 1 1 0 0 1 0 0 1 0 1 0 0</span></div><div class='xr-array-data'><pre>array([[0, 1, 1, ..., 1, 1, 0],\n",
              "       [0, 0, 1, ..., 1, 0, 0],\n",
              "       [0, 0, 0, ..., 1, 1, 1],\n",
              "       ...,\n",
              "       [0, 1, 0, ..., 0, 0, 1],\n",
              "       [0, 1, 1, ..., 0, 1, 1],\n",
              "       [1, 0, 0, ..., 1, 0, 0]])</pre></div></div></li><li class='xr-section-item'><input id='section-b5362b1a-bcb3-4817-b120-7798e465a45f' class='xr-section-summary-in' type='checkbox'  checked><label for='section-b5362b1a-bcb3-4817-b120-7798e465a45f' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-bd557083-a206-4181-bcaa-9250051fc22f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bd557083-a206-4181-bcaa-9250051fc22f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-956c16d5-9056-4aec-b8c3-3114c4b14c07' class='xr-var-data-in' type='checkbox'><label for='data-956c16d5-9056-4aec-b8c3-3114c4b14c07' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>sample</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>MultiIndex</div><input id='attrs-6b295945-6bff-4b6a-a6d5-9011c7371ce1' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6b295945-6bff-4b6a-a6d5-9011c7371ce1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ddd12edc-dc22-4e75-a6a2-892e5bc77a8d' class='xr-var-data-in' type='checkbox'><label for='data-ddd12edc-dc22-4e75-a6a2-892e5bc77a8d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([(0, 0), (0, 1), (0, 2), ..., (3, 4997), (3, 4998), (3, 4999)],\n",
              "      dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 0 0 0 0 0 0 0 ... 3 3 3 3 3 3 3 3</div><input id='attrs-b6df72f1-4743-4e2c-811c-ca00641a2283' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b6df72f1-4743-4e2c-811c-ca00641a2283' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b4e4a162-4a2f-4db9-81d2-084fe773bf04' class='xr-var-data-in' type='checkbox'><label for='data-b4e4a162-4a2f-4db9-81d2-084fe773bf04' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 0, ..., 3, 3, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-fc84b9f8-24e0-422a-a843-a1dc445c82b0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-fc84b9f8-24e0-422a-a843-a1dc445c82b0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5fd40ed0-50a9-4866-94b8-bff377923d63' class='xr-var-data-in' type='checkbox'><label for='data-5fd40ed0-50a9-4866-94b8-bff377923d63' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-c46553ac-59e2-40d3-b114-2ecb4a2fd7aa' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-c46553ac-59e2-40d3-b114-2ecb4a2fd7aa' class='xr-section-summary'  title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>"
            ],
            "text/plain": [
              "<xarray.DataArray 'y_est' (obs_id: 174, sample: 20000)>\n",
              "array([[0, 1, 1, ..., 1, 1, 0],\n",
              "       [0, 0, 1, ..., 1, 0, 0],\n",
              "       [0, 0, 0, ..., 1, 1, 1],\n",
              "       ...,\n",
              "       [0, 1, 0, ..., 0, 0, 1],\n",
              "       [0, 1, 1, ..., 0, 1, 1],\n",
              "       [1, 0, 0, ..., 1, 0, 0]])\n",
              "Coordinates:\n",
              "  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 166 167 168 169 170 171 172 173\n",
              "  * sample   (sample) object MultiIndex\n",
              "  * chain    (sample) int64 0 0 0 0 0 0 0 0 0 0 0 0 ... 3 3 3 3 3 3 3 3 3 3 3 3\n",
              "  * draw     (sample) int64 0 1 2 3 4 5 6 ... 4993 4994 4995 4996 4997 4998 4999"
            ]
          },
          "execution_count": 29,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "log_model1_ppc.posterior_predictive.y_est.stack(sample = (\"chain\", \"draw\"))"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 30,
      "metadata": {
        "collapsed": false,
        "id": "9F2063A366E7407795BB1F3E37243223",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "#stack(sample = (\"chain\", \"draw\")：将每一个X对应的4*5000个后验预测值合并到一个维度sample\n",
        "#对于每一个X，需要计算其20000个值的平均值，因此将dim设置为sample\n",
        "pred_pi = log_model1_ppc.posterior_predictive.y_est.stack(sample = (\"chain\", \"draw\")).mean(dim=\"sample\")\n",
        "# 转换为数据框\n",
        "pred_pi = pred_pi.to_dataframe()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 31,
      "metadata": {
        "collapsed": false,
        "id": "F314139A304248D38F32872DB68BF80C",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>y_est</th>\n",
              "      <th>avoidance</th>\n",
              "      <th>romantic</th>\n",
              "      <th>romantic_pred</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>obs_id</th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0.35160</td>\n",
              "      <td>0.843130</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>0.40695</td>\n",
              "      <td>-0.612479</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>0.43815</td>\n",
              "      <td>-1.288297</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>0.36605</td>\n",
              "      <td>0.479227</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>0.40085</td>\n",
              "      <td>-0.612479</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>169</th>\n",
              "      <td>0.37080</td>\n",
              "      <td>0.167311</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>170</th>\n",
              "      <td>0.36300</td>\n",
              "      <td>0.583200</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>171</th>\n",
              "      <td>0.38230</td>\n",
              "      <td>-0.040633</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>172</th>\n",
              "      <td>0.40655</td>\n",
              "      <td>-0.612479</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>173</th>\n",
              "      <td>0.41055</td>\n",
              "      <td>-0.768437</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>174 rows × 4 columns</p>\n",
              "</div>"
            ],
            "text/plain": [
              "          y_est  avoidance  romantic  romantic_pred\n",
              "obs_id                                             \n",
              "0       0.35160   0.843130         0              0\n",
              "1       0.40695  -0.612479         0              0\n",
              "2       0.43815  -1.288297         0              0\n",
              "3       0.36605   0.479227         0              0\n",
              "4       0.40085  -0.612479         1              0\n",
              "...         ...        ...       ...            ...\n",
              "169     0.37080   0.167311         0              0\n",
              "170     0.36300   0.583200         0              0\n",
              "171     0.38230  -0.040633         0              0\n",
              "172     0.40655  -0.612479         0              0\n",
              "173     0.41055  -0.768437         1              0\n",
              "\n",
              "[174 rows x 4 columns]"
            ]
          },
          "execution_count": 31,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "#将原数据中的X 和Y存入数据框\n",
        "pred_pi[\"avoidance\"] = log_model1_ppc.constant_data.avoidance.values\n",
        "pred_pi[\"romantic\"] = log_model1_ppc.observed_data.y_est.values\n",
        "\n",
        "#根据分类标准（50-50）生成最终的分类结果\n",
        "pred_pi[\"romantic_pred\"] = np.where(pred_pi[\"y_est\"] >= 0.5, 1, 0)\n",
        "pred_pi"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "5F8F6213F8E44350B8D30213EB8CD5E7",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### 评估分类结果  \n",
        "\n",
        "* $Y$为每个自变量对应的二分因变量，$\\hat{Y}$为对应的后验分类结果  \n",
        "* 我们可以使用**混淆矩阵**(confusion matrix)来对真实结果与分类结果进行比较和评估  \n",
        "\n",
        "    * a: 真阴性（True Negative，TN）表示被正确预测为负例的样本数  \n",
        "    * b: 假阳性（False Positive，FP）表示被错误预测为正例的样本数  \n",
        "    * c: 假阴性（False Negative，FN）表示被错误预测为负例的样本数  \n",
        "    * d: 真阳性（True Positive，TP）表示被正确预测为正例的样本数  \n",
        "\n",
        "|  | $\\hat{Y} = 0$    | $\\hat{Y} = 1$ |  \n",
        "| --------  | -------- | -------- |  \n",
        "| $Y=0$ | a | b |  \n",
        "| $Y=1$ | c | d |"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "8BB45991DE8B48C5B455129768193E5A",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "在二分类问题中，准确性（Accuracy）、敏感性（Sensitivity）和特异性（Specificity）是常用的评估指标，可以通过在得到 a b c d 的数量之后进行计算：  \n",
        "\n",
        "1. **准确性(accuracy)** ：准确性是指分类模型正确预测的样本数占总样本数的比例。  \n",
        "* 准确性衡量了模型总体的分类正确率，数值越高表示模型的整体性能越好。  \n",
        "\n",
        "$$  \n",
        "\\text{accuracy} = \\frac{(TP + TN)}{(TP + TN + FP + FN)} =\\frac{a + d}{a + b + c + d}  \n",
        "$$  \n",
        "\n",
        "2. **敏感性(sensitivity)** ：敏感性也称为召回率（Recall），它是指在所有实际为正例的样本中，被正确预测为正例的比例。  \n",
        "* 敏感性衡量了模型对于正例的识别能力，数值越高表示模型对于正例的预测能力越好。  \n",
        " $$  \n",
        " \\text{sensitivity} = \\frac{TP}{(TP + FN)} = \\frac{d}{c + d}  \n",
        " $$  \n",
        "\n",
        "3. **特异性(specificity)** ：特异性是指在所有实际为负例的样本中，被正确预测为负例的比例。  \n",
        "* 特异性衡量了模型对于负例的识别能力，数值越高表示模型对于负例的预测能力越好。  \n",
        " $$  \n",
        " \\text{specificity} = \\frac{TN}{(TN + FP)} = \\frac{a}{a + b}  \n",
        " $$"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 32,
      "metadata": {
        "collapsed": false,
        "id": "709CA757F1314F568BA15BCC5ED90DD1",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th>Predicted</th>\n",
              "      <th>0</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Actual</th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>109</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>65</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "Predicted    0\n",
              "Actual        \n",
              "0          109\n",
              "1           65"
            ]
          },
          "execution_count": 32,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "# 使用`pd.crosstab`生成混淆矩阵，前两个值表明你需要统计的列名\n",
        "# 由于要生成一个2*2的联表，需要指定行的名称和列的名称\n",
        "confusion_matrix = pd.crosstab(pred_pi[\"romantic\"], pred_pi[\"romantic_pred\"], \n",
        "                              rownames=['Actual'], colnames=['Predicted'])\n",
        "confusion_matrix"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 33,
      "metadata": {
        "collapsed": false,
        "id": "01EB35BA0DD3477B9141FDFCFE53815D",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "准确性: 0.3735632183908046\n",
            "敏感性: 0.0\n",
            "特异性: 1.0\n"
          ]
        }
      ],
      "source": [
        "# 计算a b c d的数量\n",
        "true_positive = 0\n",
        "false_positive = 0\n",
        "true_negative = confusion_matrix.at[0, 0]\n",
        "false_negative = confusion_matrix.at[1, 0]\n",
        "# 代入公式\n",
        "accuracy = (true_positive + false_negative) /(true_positive + false_positive + true_negative + false_negative)\n",
        "sensitivity = (true_positive) /(true_positive + false_negative)\n",
        "specificity = (true_negative) / (true_negative + false_positive)\n",
        "\n",
        "print(\"准确性:\", accuracy)\n",
        "print(\"敏感性:\", sensitivity)\n",
        "print(\"特异性:\", specificity)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "B4FE03B8AD60415183A60455E412F99F",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "## 总结  \n",
        "\n",
        "本节课学习了如何通过广义线性模型(Generalized linear model, GLM)拟合二元决策变量。  \n",
        "\n",
        "重点在于：  \n",
        "- 了解二元决策变量适合的分布，伯努利(Bernoulli)分布。  \n",
        "- 了解如何通过概率、发生率和链接函数(link function)来表示线性模型。  \n",
        "- 学习模型评估指标：准确性（Accuracy）、敏感性（Sensitivity）和特异性（Specificity）。"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "350ACD84E6AF4B52A34DED7EAF78F329",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "**补充：使用bambi建立logistic回归模型**  \n",
        "\n",
        "* 这里我们略去了对先验的定义"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 34,
      "metadata": {
        "collapsed": false,
        "id": "E68CF4D389CC44509A7835773A4E6139",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "       Formula: romantic ~ avoidance_r\n",
              "        Family: bernoulli\n",
              "          Link: p = logit\n",
              "  Observations: 174\n",
              "        Priors: \n",
              "    target = p\n",
              "        Common-level effects\n",
              "            Intercept ~ Normal(mu: 0.0, sigma: 2.5)\n",
              "            avoidance_r ~ Normal(mu: 0.0, sigma: 2.5072)"
            ]
          },
          "execution_count": 34,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "import bambi as bmb\n",
        "\n",
        "model_logit = bmb.Model(\"romantic ~ avoidance_r\", df, family=\"bernoulli\")\n",
        "model_logit"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 35,
      "metadata": {
        "collapsed": false,
        "id": "EAD17E28B0B24B1E9733B9971B0F1862",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Modeling the probability that romantic==1\n",
            "Auto-assigning NUTS sampler...\n",
            "Initializing NUTS using jitter+adapt_diag...\n",
            "Multiprocess sampling (4 chains in 4 jobs)\n",
            "NUTS: [Intercept, avoidance_r]\n"
          ]
        },
        {
          "data": {
            "text/html": [
              "\n",
              "<style>\n",
              "    /* Turns off some styling */\n",
              "    progress {\n",
              "        /* gets rid of default border in Firefox and Opera. */\n",
              "        border: none;\n",
              "        /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
              "        background-size: auto;\n",
              "    }\n",
              "    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
              "        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
              "    }\n",
              "    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
              "        background: #F44336;\n",
              "    }\n",
              "</style>\n"
            ],
            "text/plain": [
              "<IPython.core.display.HTML object>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 7 seconds.\n"
          ]
        }
      ],
      "source": [
        "model_fitted = model_logit.fit(draws=5000, tune=1000, chains=4, random_seed=84735)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 36,
      "metadata": {
        "collapsed": false,
        "id": "99816BABB9A44BF8AD624EE283C72987",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>mean</th>\n",
              "      <th>sd</th>\n",
              "      <th>hdi_3%</th>\n",
              "      <th>hdi_97%</th>\n",
              "      <th>mcse_mean</th>\n",
              "      <th>mcse_sd</th>\n",
              "      <th>ess_bulk</th>\n",
              "      <th>ess_tail</th>\n",
              "      <th>r_hat</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>Intercept</th>\n",
              "      <td>-0.526</td>\n",
              "      <td>0.158</td>\n",
              "      <td>-0.815</td>\n",
              "      <td>-0.226</td>\n",
              "      <td>0.001</td>\n",
              "      <td>0.001</td>\n",
              "      <td>21000.0</td>\n",
              "      <td>14636.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>avoidance_r</th>\n",
              "      <td>-0.183</td>\n",
              "      <td>0.164</td>\n",
              "      <td>-0.495</td>\n",
              "      <td>0.118</td>\n",
              "      <td>0.001</td>\n",
              "      <td>0.001</td>\n",
              "      <td>20296.0</td>\n",
              "      <td>15263.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "              mean     sd  hdi_3%  hdi_97%  mcse_mean  mcse_sd  ess_bulk  \\\n",
              "Intercept   -0.526  0.158  -0.815   -0.226      0.001    0.001   21000.0   \n",
              "avoidance_r -0.183  0.164  -0.495    0.118      0.001    0.001   20296.0   \n",
              "\n",
              "             ess_tail  r_hat  \n",
              "Intercept     14636.0    1.0  \n",
              "avoidance_r   15263.0    1.0  "
            ]
          },
          "execution_count": 36,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "az.summary(model_fitted,\n",
        "           var_names=[\"Intercept\",\n",
        "                      \"avoidance_r\"])"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 37,
      "metadata": {
        "collapsed": false,
        "id": "3B836E6D5C4F496C848D75D851B070EE",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "\n",
              "            <div>\n",
              "              <div class='xr-header'>\n",
              "                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n",
              "              </div>\n",
              "              <ul class=\"xr-sections group-sections\">\n",
              "              \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_posterior5f86a8e1-b13d-4f7f-8207-1e9806aac5cd\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_posterior5f86a8e1-b13d-4f7f-8207-1e9806aac5cd\" class = \"xr-section-summary\">posterior</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:        (chain: 4, draw: 5000, romantic_obs: 174)\n",
              "Coordinates:\n",
              "  * chain          (chain) int64 0 1 2 3\n",
              "  * draw           (draw) int64 0 1 2 3 4 5 6 ... 4994 4995 4996 4997 4998 4999\n",
              "  * romantic_obs   (romantic_obs) int64 0 1 2 3 4 5 ... 168 169 170 171 172 173\n",
              "Data variables:\n",
              "    Intercept      (chain, draw) float64 -0.3733 -0.671 ... -0.4743 -0.5644\n",
              "    avoidance_r    (chain, draw) float64 -0.08607 -0.186 ... -0.186 -0.1443\n",
              "    romantic_mean  (chain, draw, romantic_obs) float64 0.3903 0.4205 ... 0.3885\n",
              "Attributes:\n",
              "    created_at:                  2023-12-05T10:20:31.103356\n",
              "    arviz_version:               0.16.0\n",
              "    inference_library:           pymc\n",
              "    inference_library_version:   5.6.0\n",
              "    sampling_time:               7.120411396026611\n",
              "    tuning_steps:                1000\n",
              "    modeling_interface:          bambi\n",
              "    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-258e529d-a8b9-4ed6-9e07-075037ca1a12' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-258e529d-a8b9-4ed6-9e07-075037ca1a12' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>romantic_obs</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-1870b409-c163-4f5a-ab97-75febaa34122' class='xr-section-summary-in' type='checkbox'  checked><label for='section-1870b409-c163-4f5a-ab97-75febaa34122' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-cb0f1ba9-a378-4f73-9cf7-924e5a587a1c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-cb0f1ba9-a378-4f73-9cf7-924e5a587a1c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-670127cd-fe97-4ca7-95c3-02cff36b6032' class='xr-var-data-in' type='checkbox'><label for='data-670127cd-fe97-4ca7-95c3-02cff36b6032' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-c1ec16ea-15c6-42c6-bce1-185879f3521e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c1ec16ea-15c6-42c6-bce1-185879f3521e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-deb2d352-2aec-42ac-b8e5-a833e0a3e63b' class='xr-var-data-in' type='checkbox'><label for='data-deb2d352-2aec-42ac-b8e5-a833e0a3e63b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>romantic_obs</span></div><div class='xr-var-dims'>(romantic_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-10cfbde8-0305-4aef-910d-d8c3071bf629' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-10cfbde8-0305-4aef-910d-d8c3071bf629' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-11247485-707c-4851-a517-ce753806c3c0' class='xr-var-data-in' type='checkbox'><label for='data-11247485-707c-4851-a517-ce753806c3c0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-c69b64af-ae55-4823-8484-09009f37c2be' class='xr-section-summary-in' type='checkbox'  checked><label for='section-c69b64af-ae55-4823-8484-09009f37c2be' class='xr-section-summary' >Data variables: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>Intercept</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.3733 -0.671 ... -0.4743 -0.5644</div><input id='attrs-739f6427-45e3-42fa-be7d-22e7f3965fff' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-739f6427-45e3-42fa-be7d-22e7f3965fff' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ffb5fd40-3cdd-4f9a-a5a3-f75f62bd4089' class='xr-var-data-in' type='checkbox'><label for='data-ffb5fd40-3cdd-4f9a-a5a3-f75f62bd4089' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.37330144, -0.67104297, -0.57019941, ..., -0.65759057,\n",
              "        -0.1492513 , -0.32988181],\n",
              "       [-0.26067911, -0.67261256, -0.54161311, ..., -0.58372563,\n",
              "        -0.58372563, -0.67076468],\n",
              "       [-0.39672883, -0.39672883, -0.59781204, ..., -0.39787553,\n",
              "        -0.51090836, -0.63111118],\n",
              "       [-0.50583536, -0.47141119, -0.38454167, ..., -0.43169647,\n",
              "        -0.47432899, -0.56444915]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>avoidance_r</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.08607 -0.186 ... -0.186 -0.1443</div><input id='attrs-e269859c-f2c8-413b-9289-600b9a674a0c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e269859c-f2c8-413b-9289-600b9a674a0c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-adf91150-0936-4952-a46f-69b4dcd60ed5' class='xr-var-data-in' type='checkbox'><label for='data-adf91150-0936-4952-a46f-69b4dcd60ed5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.0860706 , -0.1859623 , -0.2898505 , ..., -0.50757857,\n",
              "         0.12981388, -0.05654363],\n",
              "       [ 0.06172495, -0.33082392, -0.27917625, ...,  0.00396789,\n",
              "         0.00396789,  0.07998721],\n",
              "       [-0.07656319, -0.07656319, -0.39343951, ..., -0.44000904,\n",
              "         0.14892019,  0.29439075],\n",
              "       [ 0.06641975, -0.45035501, -0.38209289, ..., -0.23238194,\n",
              "        -0.18600721, -0.14425616]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>romantic_mean</span></div><div class='xr-var-dims'>(chain, draw, romantic_obs)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.3903 0.4205 ... 0.3832 0.3885</div><input id='attrs-fd30bff4-780f-4cb3-bf9c-1107e15f7c04' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-fd30bff4-780f-4cb3-bf9c-1107e15f7c04' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c631e77c-7ad6-43c0-8129-37fc94960f95' class='xr-var-data-in' type='checkbox'><label for='data-c631e77c-7ad6-43c0-8129-37fc94960f95' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[0.39034313, 0.42053318, 0.43476967, ..., 0.40858835,\n",
              "         0.42053318, 0.42380771],\n",
              "        [0.3041034 , 0.36420832, 0.39377578, ..., 0.33995678,\n",
              "         0.36420832, 0.37095019],\n",
              "        [0.30691518, 0.40307422, 0.4509617 , ..., 0.36391266,\n",
              "         0.40307422, 0.41399667],\n",
              "        ...,\n",
              "        [0.25245809, 0.41418062, 0.49908038, ..., 0.34593264,\n",
              "         0.41418062, 0.43350906],\n",
              "        [0.49005097, 0.44305821, 0.42153136, ..., 0.46144519,\n",
              "         0.44305821, 0.43806839],\n",
              "        [0.40671664, 0.42671906, 0.43609226, ..., 0.41882852,\n",
              "         0.42671906, 0.42887769]],\n",
              "\n",
              "       [[0.44802914, 0.42592804, 0.41576109, ..., 0.4345804 ,\n",
              "         0.42592804, 0.42357593],\n",
              "        [0.27857522, 0.38461864, 0.43870658, ..., 0.34092602,\n",
              "         0.38461864, 0.39690083],\n",
              "        [0.31496792, 0.40839036, 0.4546373 , ..., 0.37045405,\n",
              "         0.40839036, 0.41895036],\n",
              "...\n",
              "        [0.31672572, 0.4679492 , 0.54214648, ..., 0.40612768,\n",
              "         0.4679492 , 0.48506537],\n",
              "        [0.40483735, 0.35385909, 0.33120018, ..., 0.3735635 ,\n",
              "         0.35385909, 0.34856699],\n",
              "        [0.40542725, 0.30758813, 0.26690667, ..., 0.3445522 ,\n",
              "         0.30758813, 0.29789708]],\n",
              "\n",
              "       [[0.38940002, 0.36667309, 0.35631283, ..., 0.37553721,\n",
              "         0.36667309, 0.36427089],\n",
              "        [0.29919821, 0.45126071, 0.5271682 , ..., 0.38862111,\n",
              "         0.45126071, 0.46870553],\n",
              "        [0.33032942, 0.46244143, 0.52690089, ..., 0.40877877,\n",
              "         0.46244143, 0.47728381],\n",
              "        ...,\n",
              "        [0.34804935, 0.42815874, 0.46696832, ..., 0.39597748,\n",
              "         0.42815874, 0.43705434],\n",
              "        [0.3472482 , 0.4108619 , 0.44159375, ..., 0.38538079,\n",
              "         0.4108619 , 0.41790144],\n",
              "        [0.3349066 , 0.38317459, 0.40646356, ..., 0.36387432,\n",
              "         0.38317459, 0.3885058 ]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-5b7665fe-b3b8-4dd1-91c4-eab0e6eb4c83' class='xr-section-summary-in' type='checkbox'  checked><label for='section-5b7665fe-b3b8-4dd1-91c4-eab0e6eb4c83' class='xr-section-summary' >Attributes: <span>(8)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:20:31.103356</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>7.120411396026611</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_posterior_predictive75e4d28a-1e14-497a-940b-5c372ab16d7a\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_posterior_predictive75e4d28a-1e14-497a-940b-5c372ab16d7a\" class = \"xr-section-summary\">posterior_predictive</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:       (chain: 4, draw: 5000, romantic_obs: 174)\n",
              "Coordinates:\n",
              "  * chain         (chain) int64 0 1 2 3\n",
              "  * draw          (draw) int64 0 1 2 3 4 5 6 ... 4994 4995 4996 4997 4998 4999\n",
              "  * romantic_obs  (romantic_obs) int64 0 1 2 3 4 5 6 ... 168 169 170 171 172 173\n",
              "Data variables:\n",
              "    romantic      (chain, draw, romantic_obs) int64 1 0 1 1 0 0 ... 0 1 0 0 0 0\n",
              "Attributes:\n",
              "    modeling_interface:          bambi\n",
              "    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-bedc216e-ad9d-4383-9420-d32ab7bbc1fa' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-bedc216e-ad9d-4383-9420-d32ab7bbc1fa' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>romantic_obs</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-578ce92a-8c96-4078-abf2-e22795984531' class='xr-section-summary-in' type='checkbox'  checked><label for='section-578ce92a-8c96-4078-abf2-e22795984531' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-788120df-77be-4ebc-b17c-96ecae5b8f19' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-788120df-77be-4ebc-b17c-96ecae5b8f19' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-498a227b-9875-4ce6-92e1-51d506d40a24' class='xr-var-data-in' type='checkbox'><label for='data-498a227b-9875-4ce6-92e1-51d506d40a24' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-612b7e02-11a3-4317-ac2e-c37fc3406e24' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-612b7e02-11a3-4317-ac2e-c37fc3406e24' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-21fdd3f8-ae5d-47c2-a8cb-66502b60226e' class='xr-var-data-in' type='checkbox'><label for='data-21fdd3f8-ae5d-47c2-a8cb-66502b60226e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>romantic_obs</span></div><div class='xr-var-dims'>(romantic_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-ea5830f3-785b-4948-b425-8413377120e2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ea5830f3-785b-4948-b425-8413377120e2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0f82a623-b7c3-4ea3-806c-58fec9e7462d' class='xr-var-data-in' type='checkbox'><label for='data-0f82a623-b7c3-4ea3-806c-58fec9e7462d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-9bcaa71e-20c3-4a8a-9cfd-37ce7ba24848' class='xr-section-summary-in' type='checkbox'  checked><label for='section-9bcaa71e-20c3-4a8a-9cfd-37ce7ba24848' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>romantic</span></div><div class='xr-var-dims'>(chain, draw, romantic_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 0 1 1 0 0 0 1 ... 0 1 0 1 0 0 0 0</div><input id='attrs-4a7e6386-d770-4a52-8650-137e2a859ca5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4a7e6386-d770-4a52-8650-137e2a859ca5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f36a501c-d812-41a4-b281-f409d9f4db6a' class='xr-var-data-in' type='checkbox'><label for='data-f36a501c-d812-41a4-b281-f409d9f4db6a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[1, 0, 1, ..., 0, 1, 1],\n",
              "        [0, 1, 0, ..., 0, 0, 1],\n",
              "        [0, 0, 0, ..., 1, 0, 1],\n",
              "        ...,\n",
              "        [0, 1, 1, ..., 1, 0, 0],\n",
              "        [0, 0, 1, ..., 0, 1, 0],\n",
              "        [1, 0, 0, ..., 0, 1, 1]],\n",
              "\n",
              "       [[0, 1, 0, ..., 1, 0, 0],\n",
              "        [0, 0, 0, ..., 0, 0, 0],\n",
              "        [0, 0, 1, ..., 0, 0, 0],\n",
              "        ...,\n",
              "        [1, 0, 0, ..., 0, 1, 1],\n",
              "        [0, 0, 0, ..., 0, 0, 0],\n",
              "        [1, 0, 0, ..., 1, 0, 0]],\n",
              "\n",
              "       [[1, 0, 1, ..., 0, 0, 0],\n",
              "        [0, 0, 0, ..., 1, 1, 0],\n",
              "        [0, 1, 0, ..., 0, 0, 1],\n",
              "        ...,\n",
              "        [0, 0, 1, ..., 0, 1, 0],\n",
              "        [0, 1, 0, ..., 0, 1, 0],\n",
              "        [0, 1, 0, ..., 1, 1, 0]],\n",
              "\n",
              "       [[1, 1, 1, ..., 0, 0, 0],\n",
              "        [1, 0, 1, ..., 0, 1, 0],\n",
              "        [0, 0, 0, ..., 0, 0, 0],\n",
              "        ...,\n",
              "        [0, 0, 1, ..., 1, 0, 1],\n",
              "        [1, 0, 0, ..., 1, 0, 1],\n",
              "        [0, 1, 0, ..., 0, 0, 0]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-ba5335c4-1965-4cfe-8a62-f29ca28a09e7' class='xr-section-summary-in' type='checkbox'  checked><label for='section-ba5335c4-1965-4cfe-8a62-f29ca28a09e7' class='xr-section-summary' >Attributes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_sample_statscb31bfed-59b7-429b-b7e0-003ee959a275\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_sample_statscb31bfed-59b7-429b-b7e0-003ee959a275\" class = \"xr-section-summary\">sample_stats</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:                (chain: 4, draw: 5000)\n",
              "Coordinates:\n",
              "  * chain                  (chain) int64 0 1 2 3\n",
              "  * draw                   (draw) int64 0 1 2 3 4 5 ... 4995 4996 4997 4998 4999\n",
              "Data variables: (12/17)\n",
              "    max_energy_error       (chain, draw) float64 0.5271 0.2037 ... 0.04102\n",
              "    tree_depth             (chain, draw) int64 2 2 2 2 1 2 2 2 ... 2 2 1 2 2 2 2\n",
              "    lp                     (chain, draw) float64 -118.6 -118.5 ... -118.1 -118.1\n",
              "    smallest_eigval        (chain, draw) float64 nan nan nan nan ... nan nan nan\n",
              "    energy                 (chain, draw) float64 120.3 119.2 ... 118.2 118.3\n",
              "    index_in_trajectory    (chain, draw) int64 -2 -3 -1 2 -1 -2 ... -1 -2 3 1 -3\n",
              "    ...                     ...\n",
              "    acceptance_rate        (chain, draw) float64 0.7359 0.9386 ... 1.0 0.9765\n",
              "    step_size              (chain, draw) float64 1.527 1.527 ... 0.8369 0.8369\n",
              "    largest_eigval         (chain, draw) float64 nan nan nan nan ... nan nan nan\n",
              "    perf_counter_start     (chain, draw) float64 3.032e+06 ... 3.032e+06\n",
              "    perf_counter_diff      (chain, draw) float64 0.001007 0.001049 ... 0.0006298\n",
              "    reached_max_treedepth  (chain, draw) bool False False False ... False False\n",
              "Attributes:\n",
              "    created_at:                  2023-12-05T10:20:31.171128\n",
              "    arviz_version:               0.16.0\n",
              "    inference_library:           pymc\n",
              "    inference_library_version:   5.6.0\n",
              "    sampling_time:               7.120411396026611\n",
              "    tuning_steps:                1000\n",
              "    modeling_interface:          bambi\n",
              "    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-5835123b-4681-40da-9eb3-b8e4aacbccb5' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-5835123b-4681-40da-9eb3-b8e4aacbccb5' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-3ee90997-3fd7-4456-9e97-2e081deb97d7' class='xr-section-summary-in' type='checkbox'  checked><label for='section-3ee90997-3fd7-4456-9e97-2e081deb97d7' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-8224ba4b-0b3d-4052-8b06-c9d77b19def9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8224ba4b-0b3d-4052-8b06-c9d77b19def9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1a6f9f4b-f5fe-4b7e-89bf-7b982e0f6cf4' class='xr-var-data-in' type='checkbox'><label for='data-1a6f9f4b-f5fe-4b7e-89bf-7b982e0f6cf4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-8bf1595e-1aa6-4bed-a5b7-746bdf1e3aab' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8bf1595e-1aa6-4bed-a5b7-746bdf1e3aab' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-401286df-b6e0-44b2-865d-8c37a10e66a8' class='xr-var-data-in' type='checkbox'><label for='data-401286df-b6e0-44b2-865d-8c37a10e66a8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8de96243-7878-4568-b57c-b5eb592ffd3c' class='xr-section-summary-in' type='checkbox'  ><label for='section-8de96243-7878-4568-b57c-b5eb592ffd3c' class='xr-section-summary' >Data variables: <span>(17)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>max_energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5271 0.2037 ... -0.07516 0.04102</div><input id='attrs-d10327ec-3782-4bbf-9519-8ed62aa7b1e2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d10327ec-3782-4bbf-9519-8ed62aa7b1e2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4298831e-96de-41b4-b2d5-7b18f3d8caeb' class='xr-var-data-in' type='checkbox'><label for='data-4298831e-96de-41b4-b2d5-7b18f3d8caeb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.52711848,  0.20367506, -0.03665342, ...,  0.62440547,\n",
              "         0.65371588, -1.21719406],\n",
              "       [ 0.64597516, -0.71691183, -0.17844657, ..., -0.63692333,\n",
              "         1.15708825,  0.35278258],\n",
              "       [ 1.11358266,  1.25083989,  0.21477624, ...,  0.50974454,\n",
              "        -0.35692895,  0.97518427],\n",
              "       [ 0.21792732, -0.23234975, -0.38353593, ..., -0.1926109 ,\n",
              "        -0.0751592 ,  0.04102176]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tree_depth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>2 2 2 2 1 2 2 2 ... 2 2 2 1 2 2 2 2</div><input id='attrs-abe9ccac-d47e-4ccd-9b69-f960c173b249' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-abe9ccac-d47e-4ccd-9b69-f960c173b249' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-aa09804e-42dd-4ce3-ad9c-42e17ab8c657' class='xr-var-data-in' type='checkbox'><label for='data-aa09804e-42dd-4ce3-ad9c-42e17ab8c657' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[2, 2, 2, ..., 2, 2, 1],\n",
              "       [2, 2, 2, ..., 2, 2, 2],\n",
              "       [2, 1, 2, ..., 2, 2, 1],\n",
              "       [1, 2, 2, ..., 2, 2, 2]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lp</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-118.6 -118.5 ... -118.1 -118.1</div><input id='attrs-09378013-2e0e-45d7-8962-e0508eee2a3b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-09378013-2e0e-45d7-8962-e0508eee2a3b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-347e1e71-2af8-4508-8a27-f03ec6e087a5' class='xr-var-data-in' type='checkbox'><label for='data-347e1e71-2af8-4508-8a27-f03ec6e087a5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-118.64030003, -118.52335459, -118.35238317, ..., -120.36817161,\n",
              "        -122.763068  , -119.05674695],\n",
              "       [-120.54238094, -118.93161176, -118.27356707, ..., -118.80268531,\n",
              "        -118.80268531, -119.85720605],\n",
              "       [-118.54819008, -118.54819008, -119.04613574, ..., -119.78726908,\n",
              "        -120.18181808, -122.73663164],\n",
              "       [-119.23878382, -119.58788541, -119.32163917, ..., -118.28820567,\n",
              "        -118.10384965, -118.12491414]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smallest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-ff2e2ac1-4197-400a-bc5b-25e22ce8b8ff' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ff2e2ac1-4197-400a-bc5b-25e22ce8b8ff' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-131c6354-31c8-49f4-bb66-65b58a5b2a0f' class='xr-var-data-in' type='checkbox'><label for='data-131c6354-31c8-49f4-bb66-65b58a5b2a0f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>120.3 119.2 118.7 ... 118.2 118.3</div><input id='attrs-42d0f993-f4db-4437-a266-0088f1e22f91' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-42d0f993-f4db-4437-a266-0088f1e22f91' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8a12d4c1-3b77-44eb-b53c-c217802bec3e' class='xr-var-data-in' type='checkbox'><label for='data-8a12d4c1-3b77-44eb-b53c-c217802bec3e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[120.25817881, 119.20618903, 118.65039535, ..., 120.78142616,\n",
              "        123.3536656 , 121.58254738],\n",
              "       [121.14439009, 120.25328864, 118.83303951, ..., 121.39199817,\n",
              "        121.4399081 , 120.03454661],\n",
              "       [120.01324806, 120.30117884, 119.32871179, ..., 119.97573502,\n",
              "        120.78988302, 123.48813628],\n",
              "       [119.28530804, 119.88364769, 119.94434131, ..., 119.16495009,\n",
              "        118.23217564, 118.25971204]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>index_in_trajectory</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>-2 -3 -1 2 -1 -2 ... 2 -1 -2 3 1 -3</div><input id='attrs-8aeff237-5c4e-4d38-a70d-76a437c0a9d3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8aeff237-5c4e-4d38-a70d-76a437c0a9d3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a83adf72-5616-4764-aa88-29fbce598048' class='xr-var-data-in' type='checkbox'><label for='data-a83adf72-5616-4764-aa88-29fbce598048' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-2, -3, -1, ..., -2,  2,  1],\n",
              "       [ 1, -2, -1, ..., -2,  0,  1],\n",
              "       [ 2,  0, -3, ...,  1,  2,  1],\n",
              "       [ 1,  2, -1, ...,  3,  1, -3]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>n_steps</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.0 3.0 3.0 3.0 ... 3.0 3.0 3.0 3.0</div><input id='attrs-2179287e-2cd2-456a-a108-8df3af65c61f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2179287e-2cd2-456a-a108-8df3af65c61f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-81cbb2c2-4406-480e-9d35-9bc866683565' class='xr-var-data-in' type='checkbox'><label for='data-81cbb2c2-4406-480e-9d35-9bc866683565' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[3., 3., 3., ..., 3., 3., 1.],\n",
              "       [3., 3., 3., ..., 3., 3., 3.],\n",
              "       [3., 1., 3., ..., 3., 3., 1.],\n",
              "       [1., 3., 3., ..., 3., 3., 3.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>diverging</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-dde56e23-3ff4-45e7-8774-f2aff7cc1314' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-dde56e23-3ff4-45e7-8774-f2aff7cc1314' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5ee9a489-2ab6-4772-affd-726296350e71' class='xr-var-data-in' type='checkbox'><label for='data-5ee9a489-2ab6-4772-affd-726296350e71' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>process_time_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.001007 0.001049 ... 0.0006302</div><input id='attrs-5fda5585-e696-4e5c-9580-6d86fd8b7381' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5fda5585-e696-4e5c-9580-6d86fd8b7381' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0ff31626-d293-416d-9c64-cddde50d34a5' class='xr-var-data-in' type='checkbox'><label for='data-0ff31626-d293-416d-9c64-cddde50d34a5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00100683, 0.00104933, 0.0010172 , ..., 0.00062505, 0.00061884,\n",
              "        0.00032395],\n",
              "       [0.00064459, 0.00063468, 0.0005832 , ..., 0.00061382, 0.00061933,\n",
              "        0.00066077],\n",
              "       [0.00105936, 0.00064049, 0.00105844, ..., 0.00087232, 0.00094785,\n",
              "        0.00056182],\n",
              "       [0.00033859, 0.00063819, 0.00071053, ..., 0.00060594, 0.00062544,\n",
              "        0.00063016]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.1732 -0.008118 ... 0.007066</div><input id='attrs-115a1427-34fd-40f9-a023-dec446e1eef8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-115a1427-34fd-40f9-a023-dec446e1eef8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c9766d7a-71b0-4710-9870-9a7ae9dcbc0f' class='xr-var-data-in' type='checkbox'><label for='data-c9766d7a-71b0-4710-9870-9a7ae9dcbc0f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.17321018, -0.00811785, -0.03665342, ...,  0.62440547,\n",
              "         0.65371588, -1.21719406],\n",
              "       [ 0.64597516, -0.46169138, -0.17844657, ..., -0.59743375,\n",
              "         0.        ,  0.35278258],\n",
              "       [ 0.12166363,  0.        ,  0.21477624, ...,  0.50974454,\n",
              "         0.11985122,  0.97518427],\n",
              "       [ 0.21792732,  0.10591787, -0.02797744, ..., -0.1926109 ,\n",
              "        -0.0655506 ,  0.007066  ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size_bar</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.174 1.174 1.174 ... 1.18 1.18</div><input id='attrs-d439f8fa-57bb-4627-886e-fd323a8c9daf' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d439f8fa-57bb-4627-886e-fd323a8c9daf' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9eeac4d7-327b-4a9b-8076-7668536de9ee' class='xr-var-data-in' type='checkbox'><label for='data-9eeac4d7-327b-4a9b-8076-7668536de9ee' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.17365899, 1.17365899, 1.17365899, ..., 1.17365899, 1.17365899,\n",
              "        1.17365899],\n",
              "       [1.10972656, 1.10972656, 1.10972656, ..., 1.10972656, 1.10972656,\n",
              "        1.10972656],\n",
              "       [1.19983905, 1.19983905, 1.19983905, ..., 1.19983905, 1.19983905,\n",
              "        1.19983905],\n",
              "       [1.17980414, 1.17980414, 1.17980414, ..., 1.17980414, 1.17980414,\n",
              "        1.17980414]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>acceptance_rate</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.7359 0.9386 1.0 ... 1.0 0.9765</div><input id='attrs-4e634a86-08ae-45d7-a6cc-599dc5dc24ff' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4e634a86-08ae-45d7-a6cc-599dc5dc24ff' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d0ec04d9-79dd-469b-9a9a-3d3143ac3371' class='xr-var-data-in' type='checkbox'><label for='data-d0ec04d9-79dd-469b-9a9a-3d3143ac3371' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.73590165, 0.9385758 , 1.        , ..., 0.71118056, 0.74296884,\n",
              "        1.        ],\n",
              "       [0.6187387 , 1.        , 1.        , ..., 0.98377236, 0.40957604,\n",
              "        0.8996534 ],\n",
              "       [0.56662548, 0.28626426, 0.87459172, ..., 0.77675293, 0.9623508 ,\n",
              "        0.37712286],\n",
              "       [0.80418389, 0.96649951, 1.        , ..., 0.95834565, 1.        ,\n",
              "        0.97651258]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.527 1.527 1.527 ... 0.8369 0.8369</div><input id='attrs-02bffdba-6303-445f-a9e8-0fbef07bd610' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-02bffdba-6303-445f-a9e8-0fbef07bd610' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-df745c26-c46a-4d18-a390-3c000c45f0d2' class='xr-var-data-in' type='checkbox'><label for='data-df745c26-c46a-4d18-a390-3c000c45f0d2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.52688371, 1.52688371, 1.52688371, ..., 1.52688371, 1.52688371,\n",
              "        1.52688371],\n",
              "       [1.19906262, 1.19906262, 1.19906262, ..., 1.19906262, 1.19906262,\n",
              "        1.19906262],\n",
              "       [1.19481094, 1.19481094, 1.19481094, ..., 1.19481094, 1.19481094,\n",
              "        1.19481094],\n",
              "       [0.8368821 , 0.8368821 , 0.8368821 , ..., 0.8368821 , 0.8368821 ,\n",
              "        0.8368821 ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>largest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-28aeca09-bc84-4a79-9490-684d4e5ff8df' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-28aeca09-bc84-4a79-9490-684d4e5ff8df' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7957f19b-4edb-4e8d-b043-fed6c84c74b2' class='xr-var-data-in' type='checkbox'><label for='data-7957f19b-4edb-4e8d-b043-fed6c84c74b2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan],\n",
              "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_start</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.032e+06 3.032e+06 ... 3.032e+06</div><input id='attrs-209681fb-f8e2-4b23-8931-657755aca6ac' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-209681fb-f8e2-4b23-8931-657755aca6ac' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0fafbc51-7167-41ad-a88a-5739f9645fd2' class='xr-var-data-in' type='checkbox'><label for='data-0fafbc51-7167-41ad-a88a-5739f9645fd2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[3032212.97204231, 3032212.97328309, 3032212.97458095, ...,\n",
              "        3032218.35164853, 3032218.35242931, 3032218.35320595],\n",
              "       [3032212.80876684, 3032212.80956834, 3032212.81035833, ...,\n",
              "        3032218.20916278, 3032218.20995073, 3032218.21074391],\n",
              "       [3032212.91716637, 3032212.91851428, 3032212.91938683, ...,\n",
              "        3032218.49844319, 3032218.49952529, 3032218.500664  ],\n",
              "       [3032212.86914329, 3032212.86963773, 3032212.87353094, ...,\n",
              "        3032218.7252221 , 3032218.72599572, 3032218.72678876]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.001007 0.001049 ... 0.0006298</div><input id='attrs-f7d369bc-5b1d-420e-9eda-8ed8973922e8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f7d369bc-5b1d-420e-9eda-8ed8973922e8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8341c0c3-0534-44b6-b215-89e555ada175' class='xr-var-data-in' type='checkbox'><label for='data-8341c0c3-0534-44b6-b215-89e555ada175' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00100664, 0.00104852, 0.00101631, ..., 0.00062467, 0.00061863,\n",
              "        0.00032365],\n",
              "       [0.00064444, 0.00063454, 0.0005827 , ..., 0.0006135 , 0.00061883,\n",
              "        0.0006604 ],\n",
              "       [0.00105858, 0.0006402 , 0.00105819, ..., 0.00087216, 0.0009479 ,\n",
              "        0.00056156],\n",
              "       [0.0003382 , 0.00063752, 0.00071019, ..., 0.00060542, 0.00062484,\n",
              "        0.00062978]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>reached_max_treedepth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-d3143c85-39c8-4352-a844-b2b4619edb59' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d3143c85-39c8-4352-a844-b2b4619edb59' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7ab9dbf3-913f-4928-9df2-4cf7929aef68' class='xr-var-data-in' type='checkbox'><label for='data-7ab9dbf3-913f-4928-9df2-4cf7929aef68' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False],\n",
              "       [False, False, False, ..., False, False, False]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-38545cc5-b174-401b-8ac5-0b90d52f93db' class='xr-section-summary-in' type='checkbox'  checked><label for='section-38545cc5-b174-401b-8ac5-0b90d52f93db' class='xr-section-summary' >Attributes: <span>(8)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:20:31.171128</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>7.120411396026611</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "            <li class = \"xr-section-item\">\n",
              "                  <input id=\"idata_observed_data7b241fa0-585a-4e60-9df2-cfbc331377a1\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
              "                  <label for=\"idata_observed_data7b241fa0-585a-4e60-9df2-cfbc331377a1\" class = \"xr-section-summary\">observed_data</label>\n",
              "                  <div class=\"xr-section-inline-details\"></div>\n",
              "                  <div class=\"xr-section-details\">\n",
              "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
              "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
              "<defs>\n",
              "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
              "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
              "</symbol>\n",
              "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
              "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
              "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
              "</symbol>\n",
              "</defs>\n",
              "</svg>\n",
              "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body[data-theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block !important;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt,\n",
              ".xr-attrs dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
              "Dimensions:       (romantic_obs: 174)\n",
              "Coordinates:\n",
              "  * romantic_obs  (romantic_obs) int64 0 1 2 3 4 5 6 ... 168 169 170 171 172 173\n",
              "Data variables:\n",
              "    romantic      (romantic_obs) int64 0 0 0 0 1 1 0 1 0 1 ... 0 0 0 0 0 0 0 0 1\n",
              "Attributes:\n",
              "    created_at:                  2023-12-05T10:20:31.188842\n",
              "    arviz_version:               0.16.0\n",
              "    inference_library:           pymc\n",
              "    inference_library_version:   5.6.0\n",
              "    modeling_interface:          bambi\n",
              "    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-5b8d4006-36b4-435c-88f8-0502ba27e279' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-5b8d4006-36b4-435c-88f8-0502ba27e279' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>romantic_obs</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-5669b886-c8a8-49d7-ae88-9e12b8276cea' class='xr-section-summary-in' type='checkbox'  checked><label for='section-5669b886-c8a8-49d7-ae88-9e12b8276cea' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>romantic_obs</span></div><div class='xr-var-dims'>(romantic_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-036dd572-bb61-4290-a908-85024bf7dd16' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-036dd572-bb61-4290-a908-85024bf7dd16' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c644fd81-a68d-4afc-a58e-8e2da9caef01' class='xr-var-data-in' type='checkbox'><label for='data-c644fd81-a68d-4afc-a58e-8e2da9caef01' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
              "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
              "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
              "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
              "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
              "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
              "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
              "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
              "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
              "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
              "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
              "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
              "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-f4cfd06d-c657-4fac-8eb2-90fa4681f9d5' class='xr-section-summary-in' type='checkbox'  checked><label for='section-f4cfd06d-c657-4fac-8eb2-90fa4681f9d5' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>romantic</span></div><div class='xr-var-dims'>(romantic_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 0 0 0 1 1 0 1 ... 0 0 0 0 0 0 0 1</div><input id='attrs-4cd25a55-5de9-4e97-b369-76c73ab70040' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4cd25a55-5de9-4e97-b369-76c73ab70040' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a4d7b975-20a9-4d27-bb77-4c01e800081d' class='xr-var-data-in' type='checkbox'><label for='data-a4d7b975-20a9-4d27-bb77-4c01e800081d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,\n",
              "       1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1,\n",
              "       0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0,\n",
              "       1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0,\n",
              "       1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1,\n",
              "       0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,\n",
              "       0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-657900d5-a956-489e-bd8e-cc6f6166a401' class='xr-section-summary-in' type='checkbox'  checked><label for='section-657900d5-a956-489e-bd8e-cc6f6166a401' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-05T10:20:31.188842</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n",
              "                      </ul>\n",
              "                  </div>\n",
              "            </li>\n",
              "            \n",
              "              </ul>\n",
              "            </div>\n",
              "            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n",
              " *\n",
              " */\n",
              "\n",
              ":root {\n",
              "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
              "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
              "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
              "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
              "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
              "  --xr-background-color: var(--jp-layout-color0, white);\n",
              "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
              "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
              "}\n",
              "\n",
              "html[theme=dark],\n",
              "body.vscode-dark {\n",
              "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
              "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
              "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
              "  --xr-border-color: #1F1F1F;\n",
              "  --xr-disabled-color: #515151;\n",
              "  --xr-background-color: #111111;\n",
              "  --xr-background-color-row-even: #111111;\n",
              "  --xr-background-color-row-odd: #313131;\n",
              "}\n",
              "\n",
              ".xr-wrap {\n",
              "  display: block;\n",
              "  min-width: 300px;\n",
              "  max-width: 700px;\n",
              "}\n",
              "\n",
              ".xr-text-repr-fallback {\n",
              "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-header {\n",
              "  padding-top: 6px;\n",
              "  padding-bottom: 6px;\n",
              "  margin-bottom: 4px;\n",
              "  border-bottom: solid 1px var(--xr-border-color);\n",
              "}\n",
              "\n",
              ".xr-header > div,\n",
              ".xr-header > ul {\n",
              "  display: inline;\n",
              "  margin-top: 0;\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-obj-type,\n",
              ".xr-array-name {\n",
              "  margin-left: 2px;\n",
              "  margin-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-obj-type {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-sections {\n",
              "  padding-left: 0 !important;\n",
              "  display: grid;\n",
              "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
              "}\n",
              "\n",
              ".xr-sections.group-sections {\n",
              "  grid-template-columns: auto;\n",
              "}\n",
              "\n",
              ".xr-section-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-section-item input {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-item input + label {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label {\n",
              "  cursor: pointer;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-item input:enabled + label:hover {\n",
              "  color: var(--xr-font-color0);\n",
              "}\n",
              "\n",
              ".xr-section-summary {\n",
              "  grid-column: 1;\n",
              "  color: var(--xr-font-color2);\n",
              "  font-weight: 500;\n",
              "}\n",
              "\n",
              ".xr-section-summary > span {\n",
              "  display: inline-block;\n",
              "  padding-left: 0.5em;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label {\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in + label:before {\n",
              "  display: inline-block;\n",
              "  content: '►';\n",
              "  font-size: 11px;\n",
              "  width: 15px;\n",
              "  text-align: center;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:disabled + label:before {\n",
              "  color: var(--xr-disabled-color);\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label:before {\n",
              "  content: '▼';\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked + label > span {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-section-summary,\n",
              ".xr-section-inline-details {\n",
              "  padding-top: 4px;\n",
              "  padding-bottom: 4px;\n",
              "}\n",
              "\n",
              ".xr-section-inline-details {\n",
              "  grid-column: 2 / -1;\n",
              "}\n",
              "\n",
              ".xr-section-details {\n",
              "  display: none;\n",
              "  grid-column: 1 / -1;\n",
              "  margin-bottom: 5px;\n",
              "}\n",
              "\n",
              ".xr-section-summary-in:checked ~ .xr-section-details {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-array-wrap {\n",
              "  grid-column: 1 / -1;\n",
              "  display: grid;\n",
              "  grid-template-columns: 20px auto;\n",
              "}\n",
              "\n",
              ".xr-array-wrap > label {\n",
              "  grid-column: 1;\n",
              "  vertical-align: top;\n",
              "}\n",
              "\n",
              ".xr-preview {\n",
              "  color: var(--xr-font-color3);\n",
              "}\n",
              "\n",
              ".xr-array-preview,\n",
              ".xr-array-data {\n",
              "  padding: 0 5px !important;\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-array-data,\n",
              ".xr-array-in:checked ~ .xr-array-preview {\n",
              "  display: none;\n",
              "}\n",
              "\n",
              ".xr-array-in:checked ~ .xr-array-data,\n",
              ".xr-array-preview {\n",
              "  display: inline-block;\n",
              "}\n",
              "\n",
              ".xr-dim-list {\n",
              "  display: inline-block !important;\n",
              "  list-style: none;\n",
              "  padding: 0 !important;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list li {\n",
              "  display: inline-block;\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "}\n",
              "\n",
              ".xr-dim-list:before {\n",
              "  content: '(';\n",
              "}\n",
              "\n",
              ".xr-dim-list:after {\n",
              "  content: ')';\n",
              "}\n",
              "\n",
              ".xr-dim-list li:not(:last-child):after {\n",
              "  content: ',';\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-has-index {\n",
              "  font-weight: bold;\n",
              "}\n",
              "\n",
              ".xr-var-list,\n",
              ".xr-var-item {\n",
              "  display: contents;\n",
              "}\n",
              "\n",
              ".xr-var-item > div,\n",
              ".xr-var-item label,\n",
              ".xr-var-item > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-even);\n",
              "  margin-bottom: 0;\n",
              "}\n",
              "\n",
              ".xr-var-item > .xr-var-name:hover span {\n",
              "  padding-right: 5px;\n",
              "}\n",
              "\n",
              ".xr-var-list > li:nth-child(odd) > div,\n",
              ".xr-var-list > li:nth-child(odd) > label,\n",
              ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
              "  background-color: var(--xr-background-color-row-odd);\n",
              "}\n",
              "\n",
              ".xr-var-name {\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-var-dims {\n",
              "  grid-column: 2;\n",
              "}\n",
              "\n",
              ".xr-var-dtype {\n",
              "  grid-column: 3;\n",
              "  text-align: right;\n",
              "  color: var(--xr-font-color2);\n",
              "}\n",
              "\n",
              ".xr-var-preview {\n",
              "  grid-column: 4;\n",
              "}\n",
              "\n",
              ".xr-var-name,\n",
              ".xr-var-dims,\n",
              ".xr-var-dtype,\n",
              ".xr-preview,\n",
              ".xr-attrs dt {\n",
              "  white-space: nowrap;\n",
              "  overflow: hidden;\n",
              "  text-overflow: ellipsis;\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-var-name:hover,\n",
              ".xr-var-dims:hover,\n",
              ".xr-var-dtype:hover,\n",
              ".xr-attrs dt:hover {\n",
              "  overflow: visible;\n",
              "  width: auto;\n",
              "  z-index: 1;\n",
              "}\n",
              "\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  display: none;\n",
              "  background-color: var(--xr-background-color) !important;\n",
              "  padding-bottom: 5px !important;\n",
              "}\n",
              "\n",
              ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
              ".xr-var-data-in:checked ~ .xr-var-data {\n",
              "  display: block;\n",
              "}\n",
              "\n",
              ".xr-var-data > table {\n",
              "  float: right;\n",
              "}\n",
              "\n",
              ".xr-var-name span,\n",
              ".xr-var-data,\n",
              ".xr-attrs {\n",
              "  padding-left: 25px !important;\n",
              "}\n",
              "\n",
              ".xr-attrs,\n",
              ".xr-var-attrs,\n",
              ".xr-var-data {\n",
              "  grid-column: 1 / -1;\n",
              "}\n",
              "\n",
              "dl.xr-attrs {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  display: grid;\n",
              "  grid-template-columns: 125px auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt, dd {\n",
              "  padding: 0;\n",
              "  margin: 0;\n",
              "  float: left;\n",
              "  padding-right: 10px;\n",
              "  width: auto;\n",
              "}\n",
              "\n",
              ".xr-attrs dt {\n",
              "  font-weight: normal;\n",
              "  grid-column: 1;\n",
              "}\n",
              "\n",
              ".xr-attrs dt:hover span {\n",
              "  display: inline-block;\n",
              "  background: var(--xr-background-color);\n",
              "  padding-right: 10px;\n",
              "}\n",
              "\n",
              ".xr-attrs dd {\n",
              "  grid-column: 2;\n",
              "  white-space: pre-wrap;\n",
              "  word-break: break-all;\n",
              "}\n",
              "\n",
              ".xr-icon-database,\n",
              ".xr-icon-file-text2 {\n",
              "  display: inline-block;\n",
              "  vertical-align: middle;\n",
              "  width: 1em;\n",
              "  height: 1.5em !important;\n",
              "  stroke-width: 0;\n",
              "  stroke: currentColor;\n",
              "  fill: currentColor;\n",
              "}\n",
              ".xr-wrap{width:700px!important;} </style>"
            ],
            "text/plain": [
              "Inference data with groups:\n",
              "\t> posterior\n",
              "\t> posterior_predictive\n",
              "\t> sample_stats\n",
              "\t> observed_data"
            ]
          },
          "execution_count": 37,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "posterior_predictive = model_logit.predict(model_fitted, kind=\"pps\")\n",
        "model_fitted"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 38,
      "metadata": {
        "collapsed": false,
        "id": "FCF0885C0D134FFBAA1B4109953F75EB",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "<Axes: xlabel='romantic / romantic'>"
            ]
          },
          "execution_count": 38,
          "metadata": {},
          "output_type": "execute_result"
        },
        {
          "data": {
            "text/html": [
              "<img src=\"https://cdn.kesci.com/upload/rt/FCF0885C0D134FFBAA1B4109953F75EB/s56vehe7og.png\">"
            ],
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "az.plot_ppc(model_fitted, num_pp_samples=50)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "F577EEE7573044E89E1B5F169B9959AF",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "## 练习  \n",
        "\n",
        "* 我们以性别为新的自变量，练习对logistic模型的使用  \n",
        "\n",
        "* 我们对以下关键步骤进行练习  \n",
        "    * 模型定义  \n",
        "    * 绘制后验预测回归线  \n",
        "    * 对新数据进行预测  \n",
        "    * 后验预测评估  \n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "1833E49F4EEE4120A21FB8F068DA43EF",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### 可视化"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 39,
      "metadata": {
        "collapsed": false,
        "id": "E574D38B6A884647B4F4374DDA02B054",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "#0 表示男性，1表示女性\n",
        "df[\"sex\"] =  np.where(df['sex'] == 1, 0, 1)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 40,
      "metadata": {
        "collapsed": false,
        "id": "6A4DD452DC0444399BA7D6A4F037AE6C",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<img src=\"https://cdn.kesci.com/upload/rt/6A4DD452DC0444399BA7D6A4F037AE6C/s56vei3orw.png\">"
            ],
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "sns.swarmplot(data=df,\n",
        "                x=\"sex\",\n",
        "                y=\"romantic\",\n",
        "                alpha=0.6)\n",
        "plt.xlabel(\"sex\")\n",
        "plt.xticks([0, 1],['male', 'female'])\n",
        "plt.yticks([0, 1],['no', 'yes'])\n",
        "sns.despine()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "6216EC1223BF488D99A5ED375E2480F2",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### 模型定义  \n",
        "\n",
        "$$  \n",
        "\\begin{array}{lcrl}  \n",
        "\\text{data:} & \\hspace{.01in} & Y_i|\\beta_0,\\beta_2 & \\stackrel{ind}{\\sim} \\text{Bern}(\\pi_i) \\;\\; \\text{ with } \\;\\; \\pi_i = \\frac{e^{\\beta_0 + \\beta_2 X_{i2}}}{1 + e^{\\beta_0 + \\beta_2 X_{i2}}} \\\\  \n",
        "\\text{priors:} & & \\beta_0  &  \\sim N\\left(0, 0.5^2 \\right)  \\\\  \n",
        "               & & \\beta_2  & \\sim N\\left(0, 0.5^2 \\right). \\\\  \n",
        "\\end{array}  \n",
        "$$"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "804BB6B707A9412981B423C92923DA1C",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "比如，我们这里男性编码为0，将女性编码为1。  \n",
        "\n",
        "$Y = \\beta_0 + \\beta_1 X + \\epsilon$  \n",
        "- 当虚拟变量赋值为X=0时， $E(Y) = \\beta_0$ 代表男性的恋爱情况  \n",
        "- 当虚拟变量赋值为X=1时，$E(Y) = \\beta_0+\\beta_1$ 代表女性的恋爱情况  \n",
        "- $\\beta_1$ 表示女性相对于男性的的恋爱情况的差异  \n",
        "\n",
        "![Image Name](https://cdn.kesci.com/upload/image/rloa41zjxa.png?imageView2/0/w/640/h/640)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 41,
      "metadata": {
        "collapsed": false,
        "id": "E377FB178B9A427A9EF02F9F7C68F78B",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "##---------------------------------------------------------------------------\n",
        "#      提示：参照之前的代码与先验定义，对...中的内容进行修改\n",
        "#---------------------------------------------------------------------------\n",
        "coords = {\"obs_id\": df.index}\n",
        "\n",
        "with pm.Model() as log_model2:\n",
        "    log_model2.add_coord('obs_id',df.index, mutable=True)\n",
        "    sex= pm.MutableData(\"sex\", ..., dims=\"obs_id\")\n",
        "    y = pm.MutableData('y', df.romantic, dims = 'obs_id')\n",
        "\n",
        "    #先验\n",
        "    beta_0 = pm.Normal(\"beta_0\", mu=0, sigma=0.5)          #定义beta_0          \n",
        "    beta_2 = pm.Normal(\"beta_2\", mu=0, sigma=0.5)           #定义beta_2\n",
        "    #线性关系\n",
        "    mu = pm.Deterministic(\"mu\", beta_0 + beta_2 *sex, dims=\"obs_id\")\n",
        "    #注意此处使用了Logistic sigmoid function：pm.math.invlogit\n",
        "    #相当于进行了如下计算 (1 / (1 + exp(-mu))\n",
        "    pi = pm.Deterministic(\"pi\", pm.math.invlogit(mu), dims=\"obs_id\")\n",
        "    #似然\n",
        "    likelihood = pm.Bernoulli(\"y_est\",p=pi, observed=y,dims=\"obs_id\")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "848C4A6E357B4F83A33F06B28F57E924",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### MCMC采样"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false,
        "id": "2EC6CE3B93BC4889AD67E6EE3404AF38",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "#===========================\n",
        "#     注意！！！以下代码可能需要运行1-2分钟左右\n",
        "#===========================\n",
        "with log_model2:\n",
        "    # MCMC 近似后验分布\n",
        "    log_model2_trace = pm.sample(\n",
        "                                draws=5000,                   # 使用mcmc方法进行采样，draws为采样次数\n",
        "                                tune=1000,                    # tune为调整采样策略的次数，可以决定这些结果是否要被保留\n",
        "                                chains=4,                     # 链数\n",
        "                                discard_tuned_samples= True,  # tune的结果将在采样结束后被丢弃\n",
        "                                random_seed=84735)\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false,
        "id": "1BA5CBD723DD414599F8A07281CBFE03",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "az.plot_trace(log_model2_trace,\n",
        "              var_names=[\"beta_0\",\"beta_2\"],\n",
        "              figsize=(15,8),\n",
        "              compact=False)\n",
        "plt.show()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "A926182CFA3E434CB64F16A42A7F6C8C",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### 绘制后验预测回归线"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false,
        "id": "0B5EBA395BD942AAB46C93990D37628D",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "##---------------------------------------------------------------------------\n",
        "#      提示：参照之前的代码与先验定义，对...中的内容进行修改\n",
        "#---------------------------------------------------------------------------\n",
        "\n",
        "\n",
        "#画出每个自变量对应的恋爱概率94%hdi值\n",
        "az.plot_hdi(\n",
        "    ...,\n",
        "    ...,\n",
        "    hdi_prob=0.95,\n",
        "    fill_kwargs={\"alpha\": 0.25, \"linewidth\": 0},\n",
        "    color=\"C1\"\n",
        ")\n",
        "#得到每个自变量对应的恋爱概率均值，并使用sns.lineplot连成一条光滑的曲线\n",
        "post_mean = ...\n",
        "sns.lineplot(x = ..., \n",
        "             y= ..., \n",
        "             label=\"posterior mean\", \n",
        "             color=\"C1\")\n",
        "#绘制真实数据散点图\n",
        "sns.scatterplot(x = ..., \n",
        "                y= ...,\n",
        "                label=\"observed data\", \n",
        "                color='#C00000', \n",
        "                alpha=0.5)\n",
        "#设置图例位置\n",
        "plt.legend(loc=\"upper right\",\n",
        "           bbox_to_anchor=(1.5, 1),\n",
        "           fontsize=12)\n",
        "sns.despine()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "0F2FDA89B1FC45B1B082F586DEBAAA70",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### 对新数据进行预测&分类"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false,
        "id": "BDA91EE73C864586B14B9DCB947FD254",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "##---------------------------------------------------------------------------\n",
        "#      提示：参照之前的代码与先验定义，对...中的内容进行修改\n",
        "#---------------------------------------------------------------------------\n",
        "\n",
        "pred_coords ={\"obs_id\":range(174,175)} \n",
        "\n",
        "with log_model2:\n",
        "    # 传入数据\n",
        "    pm.set_data({\"sex\": ...,\n",
        "                 \"y\":...},\n",
        "                coords=pred_coords\n",
        "                )   \n",
        "    # 生成对因变量的预测\n",
        "    prediction = pm.sample_posterior_predictive(log_model2_trace, \n",
        "                                                var_names=[\"y_est\"],\n",
        "                                                predictions=True,\n",
        "                                                extend_inferencedata=True,\n",
        "                                                random_seed=84735)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false,
        "id": "3E159F835F8C4BDF9996908DBC8BBF36",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "##---------------------------------------------------------------------------\n",
        "#      提示：参照之前的代码与先验定义，对...中的内容进行修改\n",
        "#---------------------------------------------------------------------------\n",
        "\n",
        "# 提取储存在 predicitons中的预测值\n",
        "y_pred = ....predictions[\"y_est\"].stack(sample=(\"chain\",\"draw\",\"obs_id\")).values\n",
        "# 统计其中0和1的个数，并除以总数，得到0和1对应的比例值\n",
        "y_pred_freq = np.bincount(...)/len(...)\n",
        "#绘制柱状图\n",
        "bars = plt.bar([0, 1], y_pred_freq, color=\"#70AD47\")\n",
        "#用于在柱状图上标明比例值\n",
        "for bar, freq in zip(bars, y_pred_freq):\n",
        "    plt.text(bar.get_x() + bar.get_width() / 2, bar.get_height(), f\"{freq:.2f}\", ha='center', va='bottom')\n",
        "#对刻度、标题、坐标轴标题进行设置\n",
        "plt.xticks([0, 1])\n",
        "plt.suptitle(\"Out-of-sample prediction(X=1)\")\n",
        "plt.xlabel(\"romantic\")\n",
        "plt.ylabel(\"proportion\")\n",
        "sns.despine()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "738A34ABF10A4838975B4C5C4A009DC9",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "### 后验预测评估"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false,
        "id": "6E55BF967BDD4C9192D8B5BAF6D0FEF1",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "coords = {\"obs_id\": df.index}\n",
        "\n",
        "with pm.Model(coords=coords) as log_model2:\n",
        "    sex= pm.MutableData(\"sex\", df.sex, dims=\"obs_id\")\n",
        "    y = pm.MutableData('y', df.romantic, dims = 'obs_id')\n",
        "\n",
        "    #先验\n",
        "    beta_0 = pm.Normal(\"beta_0\", mu=0, sigma=0.5)          #定义beta_0          \n",
        "    beta_2 = pm.Normal(\"beta_2\", mu=0, sigma=0.5)           #定义beta_2\n",
        "    #线性关系\n",
        "    mu = pm.Deterministic(\"mu\", beta_0 + beta_2 *sex, dims=\"obs_id\")\n",
        "    #注意此处使用了Logistic sigmoid function：pm.math.invlogit\n",
        "    #相当于进行了如下计算 (1 / (1 + exp(-mu))\n",
        "    pi = pm.Deterministic(\"pi\", pm.math.invlogit(mu), dims=\"obs_id\")\n",
        "    #似然\n",
        "    likelihood = pm.Bernoulli(\"y_est\",p=pi, observed=y,dims=\"obs_id\")\n",
        "\n",
        "    log_model2_trace = pm.sample(draws=5000,                 \n",
        "                                tune=1000,                  \n",
        "                                chains=4,                     \n",
        "                                discard_tuned_samples= True, \n",
        "                                random_seed=84735)\n",
        "    log_model2_ppc = pm.sample_posterior_predictive(log_model2_trace)\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false,
        "id": "AA5B3DE8325B47A7BAFE4986016996C1",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "#stack(sample = (\"chain\", \"draw\")：将每一个X对应的4*5000个后验预测值合并到一个维度sample\n",
        "#对于每一个X，需要计算其20000个值的平均值，因此将dim设置为sample\n",
        "pred_pi = log_model2_ppc.posterior_predictive.y_est.stack(sample = (\"chain\", \"draw\")).mean(dim=\"sample\")\n",
        "# 转换为数据框\n",
        "pred_pi = pred_pi.to_dataframe()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false,
        "id": "E91CB8D3459440EA8C8F65FF27B990CF",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "##---------------------------------------------------------------------------\n",
        "#      提示：参照之前的代码与先验定义，对...中的内容进行修改\n",
        "#---------------------------------------------------------------------------\n",
        "\n",
        "#将原数据中的X 和Y存入数据框\n",
        "pred_pi[\"sex\"] = ....constant_data.sex.values\n",
        "pred_pi[\"romantic\"] = ....observed_data.y_est.values\n",
        "\n",
        "#根据分类标准（50-50）生成最终的分类结果\n",
        "pred_pi[\"romantic_pred\"] = np.where(pred_pi[\"y_est\"] >= 0.5, 1, 0)\n",
        "pred_pi"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false,
        "id": "8B9DCA7F6D954E16A6592A95639BFF2F",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "# 使用`pd.crosstab`生成混淆矩阵，前两个值表明你需要统计的列名\n",
        "# 由于要生成一个2*2的联表，需要指定行的名称和列的名称\n",
        "confusion_matrix = pd.crosstab(pred_pi[\"sex\"], pred_pi[\"romantic_pred\"], \n",
        "                              rownames=['Actual'], colnames=['Predicted'])\n",
        "confusion_matrix"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false,
        "id": "2E51F0B41B0C4AC8A8754C06AFD700D9",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": [],
        "trusted": true
      },
      "outputs": [],
      "source": [
        "##---------------------------------------------------------------------------\n",
        "#      提示：参照之前的代码与先验定义，对...中的内容进行修改\n",
        "#---------------------------------------------------------------------------\n",
        "\n",
        "# 计算a b c d的数量\n",
        "true_positive = ...\n",
        "false_positive = ...\n",
        "true_negative = ...\n",
        "false_negative = ...\n",
        "# 代入公式\n",
        "accuracy = (true_positive + false_negative) /(true_positive + false_positive + true_negative + false_negative)\n",
        "sensitivity = (true_positive) /(true_positive + false_negative)\n",
        "specificity = (true_negative) / (true_negative + false_positive)\n",
        "\n",
        "print(\"准确性:\", accuracy)\n",
        "print(\"敏感性:\", sensitivity)\n",
        "print(\"特异性:\", specificity)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "CB41360A19A846BA84B2B74C1E9B6667",
        "jupyter": {},
        "notebookId": "656ee619625cc861b7dbf371",
        "runtime": {
          "execution_status": null,
          "is_visible": false,
          "status": "default"
        },
        "scrolled": false,
        "slideshow": {
          "slide_type": "slide"
        },
        "tags": []
      },
      "source": [
        "## 第二次小作业内容  \n",
        "\n",
        "**1. 作业内容：**  \n",
        "\n",
        "* 使用多个自变量(两个或两个以上，自行选择)对恋爱情况(因变量)建立logistic回归模型  \n",
        "\n",
        "**2. 具体要求：**  \n",
        "    重复课上的workflow，包括:  \n",
        "\t\t\n",
        "    1. 模型定义(要求附上基本的文字解释，格式参考附后）  \n",
        "    \n",
        "    2. MCMC采样，模型诊断图，后验参数解释  \n",
        "        * 使用az.plot_trace绘制模型诊断图  \n",
        "        * 对后验参数结果在模型中的意义进行文字解释  \n",
        "        * 绘制后验回归模型(使用az.plot_hdi)  \n",
        "\n",
        "    3. 使用定义好的模型，对新站点的结果进行预测并评估  \n",
        "        * 按照50-50的分类标准，计算预测结果对应的准确性、敏感性、特异性，并附上简单的文字解释  \n",
        "    \n",
        "    4. 对本数据集的预测结果进行评估  \n",
        "        * 按照50-50的分类标准，计算预测结果对应的准确性、敏感性、特异性，并附上简单的文字解释  \n",
        "    \n",
        "    5. 与课上的模型(log_model1:自变量为回避倾向; log_model2:自变量为性别)进行模型比较  \n",
        "\n",
        "**3. 作业截止时间：12.19**  \n",
        "\n",
        "**4. 作业提交于和鲸平台**  \n",
        "\n",
        "\n",
        "* 注1：所有的文字解释仅需增加在notebook中，无需提交额外的文档  \n",
        "\n",
        "* 注2：上述要求请使用pymc语法实现  \n",
        "\n",
        "* 注3：在数据预处理时注意缺失值  \n",
        "\n",
        "* 注4：每个小组内成员所使用的站点数据是相同的，但该作业为个人独立提交，小组内可以互相讨论  \n",
        "\n",
        "| 组别  | 建立模型使用的站点 | 对新数据进行预测时使用的站点  |  \n",
        "|---------|------------------------------|-----------------------|  \n",
        "| 1 | METU   | UCSB  |  \n",
        "| 2 | Oxford | Poland |  \n",
        "| 3 | Serbia | VCU |  \n",
        "| 4 | VCU |Oxford |  \n",
        "| 5 | UCSB |Serbia |  \n",
        "\n",
        "\n",
        "**模型定义文字描述格式参考：**  \n",
        "\n",
        "1. 自变量：xx  \n",
        "\n",
        "2. 因变量：xx  \n",
        "\n",
        "3. 数据关系：  \n",
        "\n",
        "$$  \n",
        "\\begin{array}{lcrl}  \n",
        "\\text{data:} & \\hspace{.01in} & Y_i|\\beta_0,\\beta_1 & {\\sim} \\text{Bern}(\\pi_i) \\;\\; \\text{ with } \\;\\; \\pi_i = \\frac{e^{\\beta_0 + \\beta_1 X_{i1}}}{1 + e^{\\beta_0 + \\beta_1 X_{i1}}} \\\\  \n",
        "\\text{priors:} & & \\beta_{0}  &  \\sim N()  \\\\  \n",
        "               & & \\beta_1  & \\sim N(). \\\\  \n",
        "\\end{array}  \n",
        "$$  "
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.5.2"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 2
}
